config.yml, either as a Dockerfile in the repository or as an existing image, and Datazone runs it on your deployment’s cluster.
Use a container when a pipeline or action needs something that has to stay up between calls:
- Model servers — an embedding or image model loaded once and called many times (for example a CLIP server that fills an Empty Vector)
- Internal APIs — a service in any language that your actions and pipelines call
- Web tools — a small web UI or API for the people in your organisation, or for anyone with the link
How it works
- Declare the container under
containers:inconfig.ymland push. Datazone registers it on that branch. Registering does not deploy it. - Deploy. Open Containers in the project and click Deploy. Datazone builds the image from the branch’s latest commit (or pulls the image you named) and starts it.
- Call it. Actions and pipelines call it with
ContainerAPI.authenticatedandpubliccontainers also get a URL. - Stop it when you don’t need it. A stopped container uses no compute.
feature-x runs the code and config of feature-x, at its own URL, without touching main. Only one deployment per branch runs at a time, and by default at most two branches of a container run at once.
Declaring a container
config.yml
Identifies the container in the project. Lowercase letters, digits and hyphens, starting and ending with a letter or digit, at most 40 characters. Unique within the project.
ContainerAPI uses it to find the container.Folder in the repository that holds the
Dockerfile. It is the build context. Set exactly one of path or image.An existing image to run instead of building one, for example
traefik/whoami:v1.10. Datazone pulls it without credentials, so it must be in a public registry. Pin a tag; latest can change between deployments.Folders copied from the project’s File Container into the build context before the build. Use it for files too large for git, such as model weights. Only for containers built from a
path.source— folder in the file containertarget— folder in the build context, relative topath
COPY weights/ /app/weights/.Size of each replica. See Compute sizes.
Who can call the container:
internal, authenticated or public. See Access levels.An HTTP path that answers
2xx when the service is ready, for example /health. When set, Datazone sends traffic to a replica only after the path answers, and restarts a replica that stops answering. Without it, a replica gets traffic as soon as its process starts.Compute sizes
Each replica gets the full CPU and memory of its size for as long as it runs.
Running containers use compute (DCU) for every replica, for every minute they run. A stopped container uses none.
Access levels
Actions and pipelines of the project can call a container at any access level.
Deploying and stopping
On the container’s page, pick the branch and click Deploy. The deployment goes through these statuses:
The Deployments tab lists every deployment with its commit, status and build log. If a deploy fails, the container that was already running keeps running.
A new deploy replaces the running one when it is ready. To pick up a new commit, a changed
config.yml entry or changed environment variables, deploy again.
Stop scales the branch down to zero. Deploy again to start it.
Environment variables
Set environment variables on the Environment tab:- Shared variables apply to every branch.
- Branch overrides replace a shared variable with the same name on one branch.
- Mark a value as secret to store it encrypted. A secret is never shown again after you save it.
Organisation overview
Settings → Containers lists every container pod running in your organisation, across all projects, like an activity monitor. You need thecompute:manage permission to see it. See Policies.
Each row is one pod (one replica), read from the cluster:
The list refreshes every 10 seconds. A pod whose container was deleted is shown as Container removed.
Click a pod to open its container branch:
- Overview — the image, commit, compute, ready replicas, access, port and URL, and a Usage chart of CPU and memory for all replicas together, against the limit they reserve. Pick the last hour, 6 hours, 24 hours or 7 days.
- Pods & Events — each replica with its node and IP, and the Kubernetes events of the deployment and its pods. The cluster keeps events for about an hour.
- Deployments — every deployment with its build log.
- Environment — the variables the next deployment gets: shared variables and this branch’s overrides. Secret values stay hidden.
Calling a container
From actions and pipelines
ContainerAPI calls a container of the same project by its alias. It signs in with the run’s access key, so it works at every access level, including internal.
Parameters:
alias— the container’s alias inconfig.ymlbranch(optional) — the branch whose deployment is called. Default:main.timeout(optional) — default request timeout in seconds. Default:300.
get, post, put, patch, delete and request(method, path). Each takes a path inside the container and the same keyword arguments as requests (json, params, data, headers, …), and returns a requests.Response.ContainerAPI raises an error that says so, for example Container 'clip-embedder' on branch 'main' cannot be called: Container not found.
With its URL
authenticated and public containers are served at:
curl, Python and JavaScript examples. For an authenticated container, send an API key in the x-api-key header. Your Datazone browser session is not accepted, so a web UI meant for people in a browser must be public.
/<path>, without the /api/v1/container-proxy/... prefix. A web UI served this way must use relative links (./assets/app.js, not /assets/app.js), because its pages are under that prefix.
Datazone removes your credentials (Authorization, x-api-key, cookies) before the request reaches the container, and drops any cookie the container tries to set. A request waits at most 5 minutes for the container to start answering.
Security
- Containers run as a non-root user (uid
10001) with all Linux capabilities dropped. Build your image so it works as a non-root user: don’t write to root-owned folders at runtime. - Images are built in an isolated build job with rootless BuildKit.
- A container accepts traffic only from the Datazone proxy and your organisation’s pipelines. It can reach the public internet, but not other services inside the cluster.
- Environment variables are stored in a Kubernetes Secret, not in the pod spec. Secret values are encrypted in Datazone.
Example: an embedding server
A small FastAPI service that loads a model once and embeds text on request.containers/clip/Dockerfile
containers/clip/server.py
Next steps
- Vectors — store the embeddings your container produces
- Actions — call containers from actions
- Project configuration — the rest of
config.yml