 apply the backup if the automatic recovery fails.The following example shows how to deploy the ZenML server to use a mounted host directory to persist the database backup file during a database migration:

mkdir mysql-data

docker run --name mysql -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password \

--mount type=bind,source=$PWD/mysql-data,target=/var/lib/mysql \

mysql:8.0

docker run -it -d -p 8080:8080 --name zenml \

--add-host host.docker.internal:host-gateway \

--mount type=bind,source=$PWD/mysql-data,target=/db-dump \

--env ZENML_STORE_URL=mysql://root:password@host.docker.internal/zenml \

--env ZENML_STORE_BACKUP_STRATEGY=dump-file \

--env ZENML_STORE_BACKUP_DIRECTORY=/db-dump \

zenmldocker/zenml-server

Troubleshooting

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.

CLI Docker deployments

If you used the zenml up --docker CLI command to deploy the Docker ZenML server, you can check the logs with the command:

zenml logs -f

Manual Docker deployments

If you used the docker run command to manually deploy the Docker ZenML server, you can check the logs with the command:

docker logs zenml -f

If you used the docker compose command to manually deploy the Docker ZenML server, you can check the logs with the command:

docker compose -p zenml logs -f

PreviousDeploy with ZenML CLI

NextDeploy with Helm

Last updated 19 days ago