Deploy with custom images
Deploying ZenML with custom Docker images.
In most cases, deploying ZenML with the default zenmlhub/zenml-server
Docker image should work just fine. However, there are some scenarios when you might need to deploy ZenML with a custom Docker image:
You have forked the ZenML repository and want to deploy a ZenML server based on your own fork because you made changes to the server / database logic.
Build and Push Custom ZenML Server Docker Image
Here is how you can build a custom ZenML server Docker image:
Clone ZenML (or your ZenML fork) and checkout the branch that you want to deploy, e.g., if you want to deploy ZenML version 0.41.0, run
Modify the copied Dockerfile:
Add additional dependencies:
(Forks only) install local files instead of official ZenML:
Build and push an image based on your Dockerfile:
Deploy ZenML with your custom image
Next, adjust your preferred deployment strategy to use the custom Docker image you just built.
Deploy a custom ZenML image via CLI
You can deploy your custom image via the zenml deploy
CLI command by setting the --config
argument to a custom configuration file that has both zenmlserver_image_repo
and zenmlserver_image_tag
set:
Run
zenml deploy
with the custom config file:
Deploy a custom ZenML image via Docker
To use your own image, follow the general guide step by step but replace all mentions of zenmldocker/zenml-server
with your custom image reference <YOUR_CONTAINER_REGISTRY>/<IMAGE_NAME>:<IMAGE_TAG>
. E.g.:
To run the ZenML server with Docker based on your custom image, do
To use
docker-compose
, adjust yourdocker-compose.yml
:
Deploy a custom ZenML image via Helm
To use your own image, the only thing you need to do differently is to modify the image
section of your values.yaml
file:
Last updated