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 [options]
Manage deployment specifications for your projects.
$ emily deployment
? Emily: Choose a project
(Use arrow keys, confirm with ENTER)
…
> M9VHKD - my-project
AB82JD - movie-recommender
· M9VHKD - my-project
? Emily: Please select an action
(Use arrow keys, confirm with ENTER)
…
> + Add a new deployment specification
· Add a new deployment specification
Emily Deployments
In Emily, deployments are specified by means of deployment specifications.
Deployment specifications are located under <project root>/deployments/<deployment>/deployment.json
.
Deployment specifications are central to how and where Emily projects run. When opening a project, Emily will:
- Deploy the project locally using
./deployments/local/deployment.json
- Open the code editor and mount it to the project
A deployment specification is a reusable specification of:
- What needs to be deployed
- Where it should be deployed to
- How it should be deployed
What
A deployment specification specifies which files are included/excluded in/from a deployment, and in what manner.
Environments and configurations
When deploying a project - whether locally or remotely - the project will run inside an environment with a given configuration.
Both the environment and configuration to use in an environment is specified in the deployment specification (deployment.json
):
{ ... "environment": "prod", "configuration": "nginx-reverse-proxy", ... }
Excludes files
Files and directories can be excluded from the deployment process with the excludes
property of deployment.json
specifications.
The exlucdes
property takes a list of glob patterns, e.g.:
{ ... "excludes": [ "data/**", "__pycache__" ] }
Any file that matches a pattern in excludes
will be added to .dockerignore
during deployment (both local and remote), and will
additionally be excluded from files transferred when deploying to a server.
Mounts
Deployment mappings also specify mount mappings for the mount targets specified in a configuration.
See documentation for emily mount
on how to add mount targets to a configuration.
A deployment specification specifices which host directories to map to each mount target specified in ./configurations/mounts.json
, e.g.:
{ ... "mounts": [ { "from": "/server/dir/data", "to": "/workspace/data" }, { "from": "/server/dir/logs", "to": "/workspace/logs" } ], ... }
Where
A deployment specification specifies where to deploy the project. How the target is specified depends of the type
of specification.
The type
property of a deployment specifications takes one of local
, server
, or kubernetes
.
Local targets
When the deployment type
is local
, the target is the developer's local system.
This is useful for local testing and, of course, development.
Server targets
When the deployment type
is server
, the target is specified by the target
property, the name
of which is a server created with emily servers add
:
{ ... "target": { "name": "my-server" }, ... }
Kubernetes targets
When the deployment type
is kubernetes
, the target is specified by means of the deployment options
property - see the next section for details.
How
A deployment specification specifies the manner of which a project is deployed.
This primarily includes a set of options
to use during the actual deployment operation.
The options
property of deployment.json
changes depending on the type
of deployment specification.
Emily will prompt the user for the required options depending on the selected deployment type during emily deployment add <local | server | kubernetes>
.
See the documentation for each subcommand for a comprehensive description of each option.