Docker Model Registry
About 231 wordsLess than 1 minute
Login
Use your CNB access token to log in. Refer to Creating an Access Token for obtaining CNB_TOKEN.
docker login -u cnb -p <YOUR_TOKEN> docker-model.cnb.coolArtifact Path Rules
When publishing artifacts to a repository, two naming rules are supported:
- Same-name artifacts: Artifact path matches repository path, e.g.
docker-model.cnb.cool/${CNB_REPO_SLUG_LOWERCASE} - Different-name artifacts: Repository path serves as namespace, artifact path = repository path/artifact name, e.g.
docker-model.cnb.cool/${CNB_REPO_SLUG_LOWERCASE}/<IMAGE_NAME>
Pushing Artifacts
Local CLI
docker model package --gguf model_file_path \
--push docker-model.cnb.cool/${CNB_REPO_SLUG_LOWERCASE}:latest
# non-same-name artifact
docker model package --gguf model_file_path \
--push docker-model.cnb.cool/${CNB_REPO_SLUG_LOWERCASE}/<IMAGE_NAME>:latestCloud Native Build
Example for pushing a same-name artifact:
.cnb.yml
main:
push:
- services:
- docker
stages:
- name: docker model package & push
script: docker model package --gguf <path> --push ${CNB_DOCKER_MODEL_REGISTRY}/${CNB_REPO_SLUG_LOWERCASE}:<tag>For a different-name artifact, append repository path/artifact name to the path:
docker model package --gguf <path> --push ${CNB_DOCKER_MODEL_REGISTRY}/${CNB_REPO_SLUG_LOWERCASE}/<IMAGE_NAME>:<tag>Workspaces
docker model package --gguf model_file_path \
--push docker-model.cnb.cool/${CNB_REPO_SLUG_LOWERCASE}:latest
# non-same-name artifact
docker model package --gguf model_file_path \
--push docker-model.cnb.cool/${CNB_REPO_SLUG_LOWERCASE}/<IMAGE_NAME>:latestPulling Artifacts
docker model pull docker-model.cnb.cool/<ARTIFACT_PATH>:latest