Docker Model Registry
About 218 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 Command Line
docker model package --gguf model_file_path \
--push docker-model.cnb.cool/${CNB_REPO_SLUG_LOWERCASE}:latest
docker model package --gguf model_file_path \
--push docker-model.cnb.cool/${CNB_REPO_SLUG_LOWERCASE}/<IMAGE_NAME>:latestCloud Native Build
.cnb.yml
main:
push:
- services:
- docker
stages:
- name: docker model package & push
script: |
# same-name artifact
docker model package --gguf <path> --push ${CNB_DOCKER_MODEL_REGISTRY}/${CNB_REPO_SLUG_LOWERCASE}:<tag>
# different-name artifact (uncomment below and comment out above as needed)
# 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
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