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 deployment add server [options]
Add a deployment specification targeting a server.
$ emily deployment add server
? Emily: Choose a project
(Use arrow keys, confirm with ENTER)
…
> M9VHKD - my-project
AB82JD - movie-recommender
· M9VHKD - my-project
√ Emily: Please enter a deployment name:
· production
? Emily: Please select a configuration
(Use arrow keys, confirm with ENTER)
…
> nginx-reverse-proxy
+ Add new configuration
· nginx-reverse-proxy
? Emily: Please select an environment
(Use arrow keys, confirm with ENTER)
…
> prod
+ Add new environment
· prod
? Emily: Select or create a server
(Use arrow keys, confirm with ENTER)
…
+ Add server
> Name: my-server
IP/Domain: my-server.com
Status: Online
· my-server
Emily: Server deployment "production" added to project my-project
(M9VHKD)
Created:
- my/project/my-project/deployments/production/deploy.sh
- my/project/my-project/deployments/production/deployment.sh
- my/project/my-project/deployments/production/post_deployment_hook.sh
Adding Server Deployment Specifications
A deployment specification of type server
specifies the deployment of your project to a server with SSH access.
Ensure that the port 22 (SSH) is open to the IP you're deploying from.
The emily deployment add server
command requires you to select the server to deploy your project to. This server is created with emily servers add
.
While creating the deployment specification, you can specify the following deploying options:
--workers
The --workers
flag specify the number of parallel worker processes to server your project under. When running on the server, requests will be load-balanced between each worker.
--server-directory
The --server-directory
flag specifies the directory on the server to place your project in. If not provided, this will default to /home/<user>
. The <user>
is specified when creating the server with emily servers add
.
--run
The --run
flag specifies a bash script to run after transferring the project files to the server. If not provided, this will default to ./deployments/<deployment>/post_deployment_hook.sh
, which is automatically generated
when creating the deployment specification. You can either choose to override the file itself, or provide another script to run. If you would like to just transfer the files without running a post script, pass --no-run
.
--force
The --force
flag specifies whether to forcefully stop any Emily container running on the same port as the project being deployed.
If not provided, the user is prompted to stop the occupying server - if one exists - or abort the deployment.