Installation

Installing ZenML and getting started.

ZenML is a Python package that can be installed directly via pip:

pip install zenml

Note that ZenML currently supports Python 3.9, 3.10, 3.11 and 3.12. Please make sure that you are using a supported Python version.

Install with the dashboard

ZenML comes bundled with a web dashboard that lives inside a sister repository. In order to get access to the dashboard locally, you need to launch the ZenML Server and Dashboard locally. For this, you need to install the optional dependencies for the ZenML Server:

pip install "zenml[server]"

We highly encourage you to install ZenML in a virtual environment. At ZenML, We like to use virtualenvwrapper or pyenv-virtualenv to manage our Python virtual environments.

Installing onto MacOS with Apple Silicon (M1, M2)

A change in how forking works on Macs running on Apple Silicon means that you should set the following environment variable which will ensure that your connections to the server remain unbroken:

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

You can read more about this here. This environment variable is needed if you are working with a local server on your Mac, but if you're just using ZenML as a client / CLI and connecting to a deployed server then you don't need to set it.

Nightly builds

ZenML also publishes nightly builds under the zenml-nightly package name. These are built from the latest develop branch (to which work ready for release is published) and are not guaranteed to be stable. To install the nightly build, run:

pip install zenml-nightly

Verifying installations

Once the installation is completed, you can check whether the installation was successful either through Bash:

zenml version

or through Python:

import zenml

print(zenml.__version__)

If you would like to learn more about the current release, please visit our PyPi package page.

Running with Docker

zenml is also available as a Docker image hosted publicly on DockerHub. Use the following command to get started in a bash environment with zenml available:

docker run -it zenmldocker/zenml /bin/bash

If you would like to run the ZenML server with Docker:

docker run -it -d -p 8080:8080 zenmldocker/zenml-server

Deploying the server

Though ZenML can run entirely as a pip package on a local system, complete with the dashboard. You can do this easily:

pip install "zenml[server]"
zenml login --local  # opens the dashboard locally 

However, advanced ZenML features are dependent on a centrally-deployed ZenML server accessible to other MLOps stack components. You can read more about it here.

For the deployment of ZenML, you have the option to either self-host it or register for a free ZenML Pro account.

Last updated