Emily CLI Documentation

Release-v3.0.6

Emily 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.

Download emily@latest
See earlier versions
$ emily open [project] [options]

Open a directory or an existing Emily project by its name or ID.

$ emily open my-project-name
Emily: Opening project my-project-name located at
/my-project/ny-project.

Emily: Starting Docker container... (this may take a while on first
startup)


Emily Open

The emily open command is used to open your projects to develop them. To open a project, simply run emily open inside a terminal, following by a project identifier, which can be:

  • The project name
  • The project path
  • The project id (can be partial as long as it's uniquely identifiable)
$ emily open my-project-name
$ emily open ~/dev/emily-projects/my-project-name
$ emily open MKLHWX
--editor vscode


Opening with editors

Emily supports opening projects with a small set of code editors:

  1. VS Code
  2. PyCharm Professional
  3. Jupyter Notebook
  4. Jupyter Lab

Because Emily projects are developed inside the Docker container that will later be deployed, the set of editors is limited as in-container development requires a substantial amount of editor-specific setup.

When first opening a project, Emily will prompt you for your preferred editor. You can also specify the editor explicitly with the --editor flag:

$ emily open <my-project>
--editor vscode


Changing environments and configurations

By default, Emily will open your project in the dev environment using the dev configuration. This environment and configuration are automatically created when building a project. To change the environment or configuration (for example, if you want to open your project in a production setting), simply provide the --environment and --configuration flags:

$ emily open <my-project>
--environment prod
--configuration nginx


Importing projects

The emily open command can also be used to import existing projects. The imported project doesn't have to be an Emily project.

Importing an Emily project

If you have a locally stored Emily project that Emily doesn't know about yet (e.g. a project from a colleague), simply run:

$ emily open ./my-colleague/their-project

You can use the --import-only flag to prevent opening the imported project. This is equivalent to emily build --no-autostart.

If the Emily project specifies mount mappings, you will be prompted for registering your own local mount mappings. To avoid this prompt, provide the mappings with the --import-mounts flag. Note that the mappings must follow the format of <source>:<target>, e.g.:

$ emily open ./my-colleague/their-project
--import-mounts ./data/training:/workspace/training-data


Importing a non-Emily project

To import a non-Emily project, simply run the same emily open command as you would with Emily projects. For non-Emily projects, you will need to provide the image to use for this project. You will be prompted to provide this unless an image is explicitly provided by the --import-image flag.

$ emily open ./my-colleague/their-project
--import-image slim


Opening a Jupyter Notebook

Emily also supports directly opening a Jupyter .ipynb file. When opening notebooks, Emily will wrap the file in a similarly named directory which will be configured as a basic Emily project. Unless provided explicitly with --import-image, you will be prompted to supply a Docker image to use for this notebook.

During opening, Emily will automatically start the Jupyter server so you're immediately ready to run and edit the notebook.

$ emily open ./my-notebook.ipynb
--import-image slim


    Options

  • -h,--help

    Display help for command

  • -ii,--import-image<image>

    The Emily image to use when importing a project. Valid emily images: base | slim | cv | nlp torch-slim | torch-cv | torch-nlp | tf-slim tf-cv | tf-nlp | cuda-base | cuda-slim cuda-cv | cuda-nlp |cuda-torch-slim| cuda-torch-cv cuda-torch-nlp| cuda-tf-slim | cuda-tf-cv | cuda-tf-nlp

  • -i,--import-only

    Import the folder without opening project. (default: false)

  • -im,--import-mounts<...mappings>

    Mount mappings to use when importing a project where the local deployment specification contains existing mount mappings. Mount mappings are specified in the format <SOURCE>:<DESTINATION>, e.g. ./data/train:/workspace/data/train.

  • -e,--editor<editor>

    The editor to use [pycharm | vscode | notebook | lab].

  • -env,--environment<name>

    Environment to open the project in. (default: dev)

  • -c,--configuration<name>

    Configuration to open the project in. (default: dev)

  • -d,--detach

    Detached mode: Run container in the background. Requires manual shutdown.

  • -s,--silent

    Execute Emily silently. (default: false)

  • -u,--update(--no-update)

    Prompt for update if newer version found. (default: true)

  • -vb,--verbose

    Print detailed information while running commands.