From cdf9a07462bd0a9166498632ff73a49ddf2f9129 Mon Sep 17 00:00:00 2001 From: Kevin Wittek Date: Wed, 11 Jun 2025 15:49:46 +0200 Subject: [PATCH 1/3] docs: add model publishing instructions to the Docker Model Runner manual - 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. --- content/manuals/ai/model-runner/_index.md | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/content/manuals/ai/model-runner/_index.md b/content/manuals/ai/model-runner/_index.md index b3d248d2b97a..4d07b72746f8 100644 --- a/content/manuals/ai/model-runner/_index.md +++ b/content/manuals/ai/model-runner/_index.md @@ -129,6 +129,33 @@ Use the [`docker model log` command](/reference/cli/docker/). {{< /tab >}} {{< /tabs >}} +## Publishing models + +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 +``` + +See the [`docker model tag`](/reference/cli/docker/model/tag) and [`docker model push`](/reference/cli/docker/model/push) command documentation for more details. +Note: This works for any Container Registry supporting OCI Artifacts, not only Docker Hub. + +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 +``` + +See the [`docker model package`](/reference/cli/docker/model/package/) command documentation for more details. + ## 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. From 92759d152635c1d51c95fa6f60b84c06d4a5e2c9 Mon Sep 17 00:00:00 2001 From: Kevin Wittek Date: Wed, 11 Jun 2025 16:06:41 +0200 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com> --- content/manuals/ai/model-runner/_index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/manuals/ai/model-runner/_index.md b/content/manuals/ai/model-runner/_index.md index 4d07b72746f8..4e9f1bb95f25 100644 --- a/content/manuals/ai/model-runner/_index.md +++ b/content/manuals/ai/model-runner/_index.md @@ -129,7 +129,7 @@ Use the [`docker model log` command](/reference/cli/docker/). {{< /tab >}} {{< /tabs >}} -## Publishing models +## Publish a model You can tag existing models with a new name and publish them under a different namespace and repository: @@ -141,10 +141,10 @@ $ docker model tag ai/smollm2 myorg/smollm2 $ docker model push myorg/smollm2 ``` -See the [`docker model tag`](/reference/cli/docker/model/tag) and [`docker model push`](/reference/cli/docker/model/push) command documentation for more details. +For more details, see the [`docker model tag`](/reference/cli/docker/model/tag) and [`docker model push`](/reference/cli/docker/model/push) command documentation. Note: This works for any Container Registry supporting OCI Artifacts, not only Docker Hub. -You can also directly package a model file in GGUF format as an OCI Artifact and publish it to Docker Hub +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 @@ -154,7 +154,7 @@ $ curl -L -o model.gguf https://huggingface.co/TheBloke/Mistral-7B-v0.1-GGUF/res $ docker model package --gguf "$(pwd)/model.gguf" --push myorg/mistral-7b-v0.1:Q4_K_M ``` -See the [`docker model package`](/reference/cli/docker/model/package/) command documentation for more details. +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 From ad4f983f49b0688b1e3ea214ba51f81b4f823ae7 Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Wed, 11 Jun 2025 15:20:37 +0100 Subject: [PATCH 3/3] edit --- content/manuals/ai/model-runner/_index.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content/manuals/ai/model-runner/_index.md b/content/manuals/ai/model-runner/_index.md index 4e9f1bb95f25..cfd11ae838fd 100644 --- a/content/manuals/ai/model-runner/_index.md +++ b/content/manuals/ai/model-runner/_index.md @@ -131,6 +131,10 @@ Use the [`docker model log` command](/reference/cli/docker/). ## 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 @@ -142,7 +146,6 @@ $ 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. -Note: This works for any Container Registry supporting OCI Artifacts, not only Docker Hub. You can also directly package a model file in GGUF format as an OCI Artifact and publish it to Docker Hub.