Base Docker images
A guide to configuring a base image for your truss
Truss uses containerized environments to ensure consistent model execution across deployments. While the default Truss image works for most cases, you may need a custom base image to meet specific package or system requirements.
Setting a base image inconfig.yaml
Specify a custom base image in config.yaml
:
image
: The Docker image to use.python_executable_path
: The path to the Python binary inside the container.
Example: NVIDIA NeMo Model
Using a custom image to deploy NVIDIA NeMo TitaNet model:
Using Private Base Images
To pull private images from a container registry, store authentication credentials as secrets.
Example: Docker Hub Authentication
Add this to config.yaml
:
Then, set a Base64-encoded secret in Baseten:
For Google Cloud Artifact Registry, use an access token:
Creating a custom base image
You can build a new base image using Truss’s base images as a foundation. Available images are listed on Docker Hub.
Example: Customizing a Truss Base Image
Building & Pushing Your Custom Image
Ensure Docker is installed and running. Then, build, tag, and push your image:
Was this page helpful?