Emily CLI Documentation
Release-v3.0.6Emily combines the powers of Python and Docker to build stable and consistent machine learning and datascience python environments. Emily is useful for large cross-team project development as well as for simply running a single jupyter notebook or python script.
Downloademily@v3.0.6
See earlier versions
$ emily deploy [project] [options]
Deploy an Emily project.
$ emily deploy
? Emily: Choose a project
(Use arrow keys, confirm with ENTER)
…
> M9VHKD - my-project
AB82JD - movie-recommender
· M9VHKD - my-project
? Emily: Please select a deployment specification
(Use arrow keys, confirm with ENTER)
…
> kubernetes-prod
+ Add a new deployment specification
· kubernetes-prod
√ Emily: Please enter the password for the Docker Hub account johnsmith:
· ***********
? Emily: Use the specified deployment and configuration?
(Use arrow keys, confirm with ENTER)
…
> √ Current
- Environment: dev
- Configuration: dev
+ Choose different environment/configuration
· Current
Emily: Deploying my-project (M9VHKD) using:
Deployment: kubernetes (kubernetes)
Environment: dev
Configuration: dev
Checking internet connection...
[1/6] Logging into Docker...
[2/6] Building Docker image...
[3/6] Pushing Docker image to repository...
[4/6] Creating namespace...
[5/6] Creating secret for .env...
[6/6] Deploying to Kubernetes cluster...
Deploying projects
You can deploy your projects with emily deploy
.
When deploying, you will be prompted to provide a deployment specification. These specifications are created with emily deployment add
.
See the documentation for emily deployment add
for details on deployment specifications.
Note: Deployment is a premium feature of Emily. You need to be logged in with emily login
to use it, and your account must have an active Emily Deploy subscription.
Alternatively, you can provide an access token with the emily deploy
command. See below for details.
Deploying to Kubernetes w. Docker Hub
If you're deploying your project using a kubernetes
deployment specification in which a Docker Hub user and repository are specified, the
password for the Docker Hub user must be provided with the --password
flag.
Deploying to Kubernetes w. Azure
If you're deploying your project using a kubernetes
deployment specification which is configured for Azure (--azure
and --acr-name
), no additional flags are required.
However, you need to make sure that:
- You are logged in with
az login
- You have configured the correct context, e.g.
kubectl config set-context prod-cluster
Deployment tags
When deploying, it's a good idea to include a --tag
with the emily deploy
command.
The tag is appended to the container image, ensuring that services like Kubernetes will trigger a rollout when a deployment with a newer tag is applied to the cluster.
If you do not include a tag, it's not guaranteed that your Kubernetes service will trigger a rollout to update the running pods.
$ emily deploy
--tag 1.0.1
Deploying with access tokens
You can authorize your Emily deployments with access tokens instead of using emily login
.
This can be useful if you're running your Emily deployments from an automated pipeline where Emily does not have access to a web browser.
To add an access token, navigate to the access token section of your profile dashboard on https://emily.ambolt.io/profile/dashboard.
Once you have your access token, it can be provided with the --access-token
flag. For security reasons, this flag must provide a path to a file containing the access token.
In addition to --access-token
, you must also specify the email address of your Emily user with --emily-user
.
$ emily deploy
--access-token ./emily.token
--emily-user john@smith.com
You can opt to override both the environment
and configuration
specified by the deployment specification with the --environment
and --configuration
flags.
Note that these flags will only temporarily override the specification, and the provided values will not be written to the deployment.json
file.