Streamline Container Image Management with GitHub Container Registry and ZenML
Seamlessly integrate GitHub Container Registry with ZenML to efficiently store, manage, and access your container images from your personal or organization GitHub account. This integration simplifies the deployment of containerized ML components, making it an ideal choice for teams already leveraging GitHub for their projects.
Features with ZenML
- Streamlined Container Registry Setup
Quickly register and configure the GitHub Container Registry in ZenML with just a few CLI commands. - Efficient Container Image Versioning
ZenML automatically tags and versions your container images, ensuring reproducibility and easy rollbacks. - Effortless handling of credentials:
Using ZenML’s Service Connectors, you can register your credentials once and ZenML would automatically use them when needed without the end-user needing access to them.
Main Features
- Built-in container registry for GitHub repositories
- Secure storage and distribution of Docker container images
- Granular access control and permissions management
- Seamless integration with GitHub Actions for automated workflows
- Supports both public and private container images
How to use ZenML with
GitHub Container Registry
from zenml import pipeline, step
# Ensure you have the GitHub integration installed
# zenml integration install github -y
# Register the GitHub Container Registry
# zenml container-registry register github_registry \\
# --flavor=github \\
# --uri=ghcr.io/my-org
# Add the container registry to your active stack
# zenml stack update -c github_registry
@step
def my_containerized_step():
print("This step runs in a container from GitHub registry")
@pipeline
def github_registry_pipeline():
my_containerized_step()
if __name__ == "__main__":
github_registry_pipeline()
The code example demonstrates how to register the GitHub Container Registry in ZenML, add it to the active stack, and use it to run a containerized step within a pipeline. The my_containerized_step will be executed inside a container image pulled from the specified GitHub Container Registry.
Additional Resources
GitHub Container Registry Documentation
ZenML GitHub Integration Docs