Emily CLI Documentation

Release-v3.1.0

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 deployment logs [options]

View logs for active deployments.

$ emily deployment logs

? 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

Attaching to emily-my-project-m9vhkd-dev
emily-my-project-m9vhkd-dev | 2022-11-03T14:23:28.941527400Z [2022-11-03 14:23:28 +0000] [1] [INFO] Starting gunicorn 20.1.0
emily-my-project-m9vhkd-dev | 2022-11-03T14:23:28.942380400Z [2022-11-03 14:23:28 +0000] [1] [INFO] Listening at: http://0.0.0.0:4242 (1)
emily-my-project-m9vhkd-dev | 2022-11-03T14:23:28.942414000Z [2022-11-03 14:23:28 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker
emily-my-project-m9vhkd-dev | 2022-11-03T14:23:28.948457500Z [2022-11-03 14:23:28 +0000] [7] [INFO] Booting worker with pid: 7

$ emily deployment logs
--project my-project
--name production
--tail 20


$ emily deployment logs
--project my-project
--name production
--follow


Attaching to emily-my-project-m9vhkd-dev
emily-my-project-m9vhkd-dev | 2022-11-03T14:23:28.941527400Z [2022-11-03 14:23:28 +0000] [1] [INFO] Starting gunicorn 20.1.0
emily-my-project-m9vhkd-dev | 2022-11-03T14:23:28.942380400Z [2022-11-03 14:23:28 +0000] [1] [INFO] Listening at: http://0.0.0.0:4242 (1)
emily-my-project-m9vhkd-dev | 2022-11-03T14:23:28.942414000Z [2022-11-03 14:23:28 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker
emily-my-project-m9vhkd-dev | 2022-11-03T14:23:28.948457500Z [2022-11-03 14:23:28 +0000] [7] [INFO] Booting worker with pid: 7
... (more lines will appear as logs are received)

Viewing logs for active deployments

After deploying a project, whether it's a local, server, or Kubernetes deployment, you can use emily deployment logs to view live logs for the deployment.

By default, the command outputs the entire log for the service. If you want to limit the number of output log lines, specify the number of lines with --tail <n>:

In some cases, Docker Compose may not be able to connect to your service (e.g., if the project no longer exists). In these cases, the output will simply show Attaching to.

Live log feed

To receive a live-updating stream of logs from a deployment, set the --follow flag:

You can close the log stream with CTRL+C.

    Options

  • -h,--help

    Display help for command

  • -n,--name<name>

    The name of the deployment.

  • -c,--color(--no-color)

    Produce multi-colored output. If set to false (--no-color), output will be monochrome. (default: true)

  • -f,--follow

    Follow log output. (default: false)

  • -ts,--timestamps(--no-timestamps)

    Show timestamps. (default: true)

  • -lp,--log-prefix(--no-log-prefix)

    Print prefix in logs. (default: true)

  • -t,--tail<n>

    Number of lines to show from the end of the logs for each container. (default: all)

  • -s,--services<...services>

    Only show logs for the specified services. (default: )

  • -p,--project<project>

    The project to manage deployment specifications for.

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