Local Image Builder
Building container images locally.
The local image builder is an image builder flavor that comes built-in with ZenML and uses the local Docker installation on your client machine to build container images.
When to use it
You should use the local image builder if:
you're able to install and use Docker on your client machine.
you want to use remote components that require containerization without the additional hassle of configuring infrastructure for an additional component.
How to deploy it
The local image builder comes with ZenML and works without any additional setup.
How to use it
To use the Local image builder, we need:
Docker installed and running.
The Docker client authenticated to push to the container registry that you intend to use in the same stack.
We can then register the image builder and use it to create a new stack:
Use the Docker CLI for builds (subprocess mode)
By default, the local image builder uses the Docker Python SDK to run builds. You can alternatively configure it to call the Docker CLI (docker build) via a subprocess. This can help if you require some options that are only available for Docker BuildKit, which is not supported in the Python SDK yet.
Enable subprocess mode when registering or updating the component:
In subprocess mode, the build options passed via DockerSettings are handled in the following way:
The
buildargs,labelsdictionaries are passed as--build-arg KEY=VALUEand--label KEY=VALUErespectivelyLists will pass multiple command line arguments with the same name for all values
Trueboolean values means the argument will be passed without any value (--KEY)All other values are converted to a string and passed as
--KEY VALUE
For more information and a full list of configurable attributes of the local image builder, check out the SDK Docs .
Last updated
Was this helpful?