Hugging Face Launches a Container Registry That Uploads Only Changed Data
Hugging Face now hosts Docker and OCI images alongside models and datasets, with Xet chunk-level deduplication cutting push sizes for massive inference containers.
Takeaways
- Hugging Face launched Container Repos, a new repo type for Docker and OCI images at
cr.hf.co. - Images sit next to models, datasets, and Spaces with the same org permissions, tokens, and storage.
- Xet-backed chunk-level deduplication means small changes in big layers upload only the changed bytes.
- Works with Docker, Podman, Kubernetes, Helm, crane, skopeo, and GitHub Actions OIDC out of the box.
- Untagged images are garbage collected automatically; layers can be up to 100 GB.
- Billed as regular Hub storage: 100 GB free per org, 1 TB per seat on Team and Enterprise.
Hugging Face has added container repositories to the Hub, giving Docker and other Open Container Initiative images a registry at cr.hf.co. The repositories use the Hub’s existing organization permissions, access tokens, billing, and Xet storage. Teams can now keep inference images, model weights, training datasets, and Spaces under the same organization and access controls.
The registry’s main optimization targets large images that change incrementally. Its hf containers client deduplicates layer data in content-addressed chunks, so a small dependency update can transfer only the changed chunks. For CUDA or vLLM images that span tens of gigabytes, this can remove repeated uploads of otherwise unchanged data.
Why a 100 MB change stays 100 MB
Standard registries identify each compressed container layer with a digest. Changing one file rebuilds the affected layer, produces a new digest, and requires the client to upload the complete new layer blob if the registry does not already have it.
The container client changes that data path. It stores layers uncompressed in Xet, divides their contents into addressable chunks, and transfers those chunks over parallel connections. The registry handles the image manifests and registration calls, while the larger layer data moves directly between the client and Xet-backed storage.
Xet checks which chunks already exist and uploads only the missing data. The container docs provide a concrete example: rebuilding a 2 GB layer after changing 100 MB of dependencies transfers roughly 100 MB with hf containers push. The uncompressed layer still consumes about 2 GB of storage quota, so lower transfer volume can come with higher storage use.
| Push method | Changed data uploaded | Storage and digest behavior |
|---|---|---|
hf containers push |
Missing Xet chunks | Uncompressed storage; digest differs by default |
docker push or another OCI client |
Complete changed layer blobs | Compressed storage; standard OCI digest |
Push from the CLI or existing tools
Each image uses the path cr.hf.co/namespace/repository:tag. Developers can install the CLI extension, authenticate with a Hugging Face token, and run the familiar build, push, and pull sequence:
hf extensions install hf-containers
hf auth login
hf containers build -t cr.hf.co/my-org/my-app:v2 .
hf containers push cr.hf.co/my-org/my-app:v2
hf containers pull cr.hf.co/my-org/my-app:v2
Standard OCI clients such as Docker, Podman, crane, skopeo, ORAS, and Helm also work with the registry. Authentication uses a Hugging Face username and a User Access Token as the password. Read permission allows pulls, write permission allows pushes, and public images remain available without authentication. These clients use conventional layer transfers and do not receive the Xet chunk-transfer optimization.
The hf containers copy command can import an image from Docker Hub, ghcr.io, quay.io, or registry.k8s.io directly into a Hub repository. The image does not need to pass through a local Docker daemon, which supports server-side mirroring into private organizations.
Kubernetes and CI use existing primitives
Kubernetes pulls private images through a standard docker-registry secret configured for cr.hf.co. The token needs read permission, and the resulting secret is referenced through imagePullSecrets:
kubectl create secret docker-registry hf-registry \
--docker-server=cr.hf.co \
--docker-username="$HF_USERNAME" \
--docker-password="$HF_TOKEN"
spec:
imagePullSecrets:
- name: hf-registry
containers:
- name: app
image: cr.hf.co/my-org/my-app:v2
GitHub Actions can push through OpenID Connect without storing a long-lived HF_TOKEN. Repository administrators register the GitHub repository as a trusted publisher in the container repository settings, and the workflow grants id-token: write. The job then exchanges its GitHub identity token for a Hugging Face token scoped to that container repository and valid for 60 minutes.
Digests, cleanup, and hard limits
- Layer size: Each layer can be up to 100 GB.
- Manifest size: Each manifest can be up to 4 MiB.
- Garbage collection: Untagged images are deleted automatically a few hours after their final tag is removed. Layers disappear when no remaining image references them.
- Rate limits: Pulls count as Hub resolver requests. Authenticated pulls are especially relevant for clusters and CI runners that share an egress IP.
- Digest compatibility: Images pushed with
hf containersreceive different digests from images pushed through standard OCI clients. Deployments, signatures, or policies pinned to existing digests can use--preserve-digests, which disables chunk-level deduplication for that push.
Storage can outweigh transfer savings
Container repositories draw from the owning organization’s regular Hub storage allocation. Private images use private storage, public images use public storage, and both share their respective pools with models and datasets.
| Organization plan | Included private storage | Additional storage |
|---|---|---|
| Free | 100 GB | Subject to plan limits |
| Team | 1 TB per seat | $18 per TB per month, with volume discounts |
| Enterprise | 1 TB per seat | $18 per TB per month, with volume discounts |
Hugging Face’s worked example shows the storage trade-off clearly. A Team organization with 10 members receives 10 TB of included private storage. Twelve releases of a vLLM-sized image consume roughly 110 GB when pushed with Docker and about 250 GB when pushed with hf containers, because the Xet path stores uncompressed layer data.
Large images, small edits
Teams that frequently rebuild vLLM, PyTorch, CUDA, or similar inference images stand to save the most transfer time. Updating one package can send only the affected chunks, and keeping containers beside models and datasets can also eliminate a separate registry, credential set, and billing account.
Teams with infrequent image changes, ample registry performance, or tight Hub storage quotas may see little benefit. GHCR, ECR, Artifact Registry, and other OCI registries remain effective when standard compressed layers fit the deployment pattern. The practical decision depends on rebuild frequency, changed bytes per release, storage consumption, and the value of consolidating access controls inside Hugging Face.