LogoLogo
ProductResourcesGitHubStart free
  • Documentation
  • Learn
  • ZenML Pro
  • Stacks
  • API Reference
  • SDK Reference
  • Getting Started
    • Welcome to ZenML
    • Installation
    • Hello World
    • Core Concepts
    • System Architecture
  • Deploying ZenML
    • Deploy
      • Deploy with Docker
      • Deploy with Helm
      • Deploy using HuggingFace Spaces
      • Deploy with custom images
      • Secret management
      • Custom secret stores
    • Connect
      • with your User (interactive)
      • with an API Token
      • with a Service Account
    • Manage
      • Best practices for upgrading
      • Using ZenML server in production
      • Troubleshoot your ZenML server
      • Migration guide
        • Migration guide 0.13.2 → 0.20.0
        • Migration guide 0.23.0 → 0.30.0
        • Migration guide 0.39.1 → 0.41.0
        • Migration guide 0.58.2 → 0.60.0
  • Concepts
    • Steps & Pipelines
      • Configuration
      • Scheduling
      • Logging
      • Advanced Features
      • YAML Configuration
    • Artifacts
      • Materializers
      • Visualizations
    • Stack & Components
    • Service Connectors
    • Containerization
    • Code Repositories
    • Secrets
    • Tags
    • Metadata
    • Models
    • Templates
    • Dashboard
  • Reference
    • Community & content
    • Environment Variables
    • llms.txt
    • FAQ
    • Global settings
    • Legacy docs
Powered by GitBook
On this page
  • Components
  • Deployment scenarios
  • How to deploy ZenML
  • Options for deploying ZenML

Was this helpful?

Edit on GitHub
  1. Deploying ZenML

Deploy

Why do we need to deploy ZenML?

PreviousSystem ArchitectureNextDeploy with Docker

Last updated 26 days ago

Was this helpful?

Moving your ZenML Server to a production environment offers several benefits over staying local:

  1. Scalability: Production environments are designed to handle large-scale workloads, allowing your models to process more data and deliver faster results.

  2. Reliability: Production-grade infrastructure ensures high availability and fault tolerance, minimizing downtime and ensuring consistent performance.

  3. Collaboration: A shared production environment enables seamless collaboration between team members, making it easier to iterate on models and share insights.

Despite these advantages, transitioning to production can be challenging due to the complexities involved in setting up the needed infrastructure.

Components

A ZenML deployment consists of multiple infrastructure components:

Details on the ZenML Python Client

Deployment scenarios

When you first get started with ZenML, you have the following architecture on your machine.

The SQLite database that you can see in this diagram is used to store information about pipelines, pipeline runs, stacks, and other configurations. This default setup allows you to get started and try out the core features, but you won't be able to use cloud-based components like serverless orchestrators and so on.

Users can run the zenml login --local command to spin up a local ZenML OSS server to serve the dashboard. For the local OSS server option, the zenml login --local command implicitly connects the client to the server. The diagram for this looks as follows:

In order to move into production, the ZenML server needs to be deployed somewhere centrally so that the different cloud stack components can read from and write to the server. Additionally, this also allows all your team members to connect to it and share stacks and pipelines.

You connect to your deployed ZenML server using the zenml login command, and then you have the full benefits and power of ZenML. You can use all the cloud-based components, your metadata will be stored and synchronized across all the users of the server, and you can leverage features like centralized logs storage and pipeline artifact visualization.

How to deploy ZenML

Deploying the ZenML Server is a crucial step towards transitioning to a production-grade environment for your machine learning projects. By setting up a deployed ZenML Server instance, you gain access to powerful features, allowing you to use stacks with remote components, centrally track progress, collaborate effectively, and achieve reproducible results.

Currently, there are two main options to access a deployed ZenML server:

Both options offer distinct advantages, allowing you to choose the deployment approach that best aligns with your organization's needs and infrastructure preferences. Whichever path you select, ZenML facilitates a seamless and efficient way to take advantage of the ZenML Server and enhance your machine learning workflows for production-level success.

Options for deploying ZenML

Documentation for the various deployment strategies can be found in the following pages below (in our 'how-to' guides):

backed with a SQLite or MySQL database

An dashboard

(Optional)

You can read more in-depth about the system architecture of ZenML . This documentation page will focus on the components required to deploy ZenML OSS.

The ZenML client is a Python package that you can install on your machine. It is used to interact with the ZenML server. You can install it using the pip command as outlined .

This Python package gives you which you can use to interact with the ZenML server for common tasks like managing stacks, setting up secrets, and so on. It also gives you the general framework that lets you and so forth.

If you want to have more fine-grained control and access to the metadata that ZenML manages, you can use the Python SDK to access the API. This allows you to create your own custom automations and scripts and is the most common way teams access the metadata stored in the ZenML server. The full documentation for the Python SDK can be found . The full HTTP can also be found by adding the/doc suffix to the URL when accessing your deployed ZenML server.

Managed deployment: With offering you can utilize a control plane to create ZenML servers, also known as . These workspaces are managed and maintained by ZenML's dedicated team, alleviating the burden of server management from your end. Importantly, your data remains securely within your stack, and ZenML's role is primarily to handle tracking of metadata and server maintenance.

Self-hosted Deployment: Alternatively, you have the ability to deploy ZenML on your own self-hosted environment. This can be achieved through various methods, including using , , or . We also offer our Pro version for self-hosted deployments, so you can use our full paid feature set while staying fully in control with an air-gapped solution on your infrastructure.

FastAPI server
Python Client
open-source companion ReactJS
ZenML Pro API + Database + ZenML Pro dashboard
here
here
the zenml command-line interface
author and deploy pipelines
here
API documentation
ZenML Pro
workspaces
Docker
Helm
HuggingFace Spaces
ZenML Scarf
ZenML OSS server deployment architecture
ZenML default local configuration
ZenML with a local ZenML OSS Server
ZenML centrally deployed for multiple users
Cover

Deploying ZenML using ZenML Pro

Deploying ZenML using ZenML Pro.

Cover

Deploy with Docker

Deploying ZenML in a Docker container.

Cover

Deploy with Helm

Deploying ZenML in a Kubernetes cluster with Helm.

Cover

Deploy with HuggingFace Spaces

Deploying ZenML to Hugging Face Spaces.