Deploying with Docker
Deploying ZenML on cloud using Docker or Helm
This is an older version of the ZenML documentation. To read and view the latest version please visit this up-to-date URL.
If you wish to deploy ZenML on clouds other than AWS, Azure and GCP or on any other resource like a serverless platform or an on-prem Kubernetes cluster, you have two options:
Using a Docker container.
Using the Helm chart.
Using Docker
The ZenML server image is available at zenmldocker/zenml-server
and can be used in container services, serverless platforms like Cloud Run, Container Apps and more!
Configure your ZenML Deployment
Before running your ZenML server, you need to configure some settings for it like the database it should use, the default user details and more. You can set the following as environment variables wherever you want to run your ZenML server Docker container.
You can set all of these variables in a file and then pass it to the docker
CLI using the --env-file
flag. More details in the Docker documentation here.
Run ZenML on Docker
Once all the environment variables are set, you can run the image locally using the following command:
You can check the logs of the container to verify if the server is up and depending on where you have deployed it, you can also access the dashboard at a localhost
port (if running locally) or through some other service that exposes your container to the internet.
Using the ZenML CLI
If you don't want to set variables and configure ZenML with a custom backend, you can choose to use the local store configuration through the ZenML CLI: run the up
command with the --docker
flag.
This command deploys a ZenML server locally in a Docker container. The output shows the URL at which you can access your ZenML dashboard and server.
Last updated