From 7a31d0c3ed8d5b77b031be63af6b57a87fc6bb0c Mon Sep 17 00:00:00 2001 From: Kevin Wittek Date: Wed, 11 Jun 2025 16:29:06 +0200 Subject: [PATCH] docs: add model publishing instructions to the Docker Model Runner docs (#22819) ## Description - Introduced a new section on publishing models, including tagging and pushing to Docker Hub. - Added examples for tagging existing models and packaging GGUF format models as OCI Artifacts. - Clarified that the functionality supports any Container Registry compatible with OCI Artifacts. --------- Co-authored-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com> Co-authored-by: aevesdocker --- content/manuals/ai/model-runner/_index.md | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/content/manuals/ai/model-runner/_index.md b/content/manuals/ai/model-runner/_index.md index b3d248d2b9..cfd11ae838 100644 --- a/content/manuals/ai/model-runner/_index.md +++ b/content/manuals/ai/model-runner/_index.md @@ -129,6 +129,36 @@ Use the [`docker model log` command](/reference/cli/docker/). {{< /tab >}} {{< /tabs >}} +## Publish a model + +> [!NOTE] +> +> This works for any Container Registry supporting OCI Artifacts, not only Docker Hub. + +You can tag existing models with a new name and publish them under a different namespace and repository: + +```console +# Tag a pulled model under a new name +$ docker model tag ai/smollm2 myorg/smollm2 + +# Push it to Docker Hub +$ docker model push myorg/smollm2 +``` + +For more details, see the [`docker model tag`](/reference/cli/docker/model/tag) and [`docker model push`](/reference/cli/docker/model/push) command documentation. + +You can also directly package a model file in GGUF format as an OCI Artifact and publish it to Docker Hub. + +```console +# Download a model file in GGUF format, e.g. from HuggingFace +$ curl -L -o model.gguf https://huggingface.co/TheBloke/Mistral-7B-v0.1-GGUF/resolve/main/mistral-7b-v0.1.Q4_K_M.gguf + +# Package it as OCI Artifact and push it to Docker Hub +$ docker model package --gguf "$(pwd)/model.gguf" --push myorg/mistral-7b-v0.1:Q4_K_M +``` + +For more details, see the [`docker model package`](/reference/cli/docker/model/package/) command documentation. + ## Example: Integrate Docker Model Runner into your software development lifecycle You can now start building your Generative AI application powered by the Docker Model Runner.