Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.

Conversation

@doringeman
Copy link
Collaborator

@doringeman doringeman commented Jul 4, 2025

Show untagged model information on docker model rm to make it more similar to docker image rm.

Requires docker/model-runner#100 which requires docker/model-distribution@08f8ace.

You can test it by running docker/model-runner#100 in a separate terminal and then installing and trying out these changes.

$ MODEL_RUNNER_PORT=8080 make run
$ make install

$ MODEL_RUNNER_HOST=http://localhost:8080 docker model tag ai/smollm2 dorin/smollm2
Model "ai/smollm2" tagged successfully with "index.docker.io/dorin/smollm2:latest"

$ MODEL_RUNNER_HOST=http://localhost:8080 docker model inspect ai/smollm2
{
   "id": "sha256:354bf30d0aa3af413d2aa5ae4f23c66d78980072d1e07a5b0d776e9606a2f0b9",
   "tags": [
       "ai/smollm2",
       "index.docker.io/dorin/smollm2:latest"
   ],
   "created": 1742816981,
   "config": {
       "format": "gguf",
       "quantization": "IQ2_XXS/Q4_K_M",
       "parameters": "361.82 M",
       "architecture": "llama",
       "size": "256.35 MiB"
   }
}

$ MODEL_RUNNER_HOST=http://localhost:8080 docker model rm -f 354bf30d0aa3af413d2aa5ae4f23c66d78980072d1e07a5b0d776e9606a2f0b9
Untagged: ai/smollm2
Untagged: index.docker.io/dorin/smollm2:latest
Model sha256:354bf30d0aa3af413d2aa5ae4f23c66d78980072d1e07a5b0d776e9606a2f0b9 removed successfully
# remove multiple models

$ MODEL_RUNNER_HOST=http://localhost:8080 docker model inspect ai/smollm2
{
    "id": "sha256:354bf30d0aa3af413d2aa5ae4f23c66d78980072d1e07a5b0d776e9606a2f0b9",
    "tags": [
        "ai/smollm2",
        "index.docker.io/dorin/smollm2:latest"
    ],
...

$ MODEL_RUNNER_HOST=http://localhost:8080 docker model inspect ignasi/smollm2
{
    "id": "sha256:425de603d029591fe3591148d0a58f647675c36787e1c1bcdeb74943b3759246",
    "tags": [
        "ghcr.io/ilopezluna/smollm2",
        "index.docker.io/ignasi/smollm2:latest"
    ],
...

$ MODEL_RUNNER_HOST=http://localhost:8080 docker model rm -f 354bf30d0aa3af413d2aa5ae4f23c66d78980072d1e07a5b0d776e9606a2f0b9 425de603d029591fe3591148d0a58f647675c36787e1c1bcdeb74943b3759246
Untagged: ai/smollm2
Untagged: index.docker.io/dorin/smollm2:latest
Deleted: sha256:354bf30d0aa3af413d2aa5ae4f23c66d78980072d1e07a5b0d776e9606a2f0b9
Untagged: ghcr.io/ilopezluna/smollm2
Untagged: index.docker.io/ignasi/smollm2:latest
Deleted: sha256:425de603d029591fe3591148d0a58f647675c36787e1c1bcdeb74943b3759246

Same as:

$ docker image rm -f 8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715 f85340bf132ae937d2c2a763b8335c9bab35d6e8293f70f606b9c6178d84f42b
Untagged: dorin/alpine:latest
Untagged: alpine:latest
Deleted: sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715
Untagged: busybox:latest
Untagged: mybusybox:latest
Deleted: sha256:f85340bf132ae937d2c2a763b8335c9bab35d6e8293f70f606b9c6178d84f42b

@doringeman doringeman requested a review from a team July 4, 2025 11:40
@doringeman doringeman merged commit 520804f into docker:main Jul 11, 2025
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants