Skip to content

Conversation

@doringeman
Copy link
Contributor

@doringeman doringeman commented Jul 4, 2025

Return untagged model information on DELETE <inference-prefix>/models/{name} requests.

Bump model-distribution to docker/model-distribution@67a3bf2 (to also include docker/model-distribution@08f8ace) for the change of m.distributionClient.DeleteModel.

This is how the docker model rm output will look like with these changes:

$ docker model rm -f 354bf30d0aa3af413d2aa5ae4f23c66d78980072d1e07a5b0d776e9606a2f0b9
Untagged: ai/smollm2
Untagged: index.docker.io/dorin/smollm2:latest
Deleted: sha256:354bf30d0aa3af413d2aa5ae4f23c66d78980072d1e07a5b0d776e9606a2f0b9
$ docker image rm -f 8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715
Untagged: dorin/alpine:latest
Untagged: alpine:latest
Deleted: sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715

Comment on lines 351 to 354
w.Header().Set("Content-Type", "text/plain")
if _, err := w.Write([]byte(out)); err != nil {
http.Error(w, fmt.Sprintf("error writing response: %v", err), http.StatusInternalServerError)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed the review window on docker/model-distribution#104, but would it maybe make more sense to have DeleteModel return some sort of structure (e.g. []string) and then handle the formatting at the API and CLI layers? E.g. the corresponding DELETE /images response uses a JSON structure to format the results: https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Image/operation/ImageDelete

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


w.Header().Set("Content-Type", "application/json")
if err := json.NewEncoder(w).Encode(resp); err != nil {
http.Error(w, fmt.Sprintf("error writing response: %v", err), http.StatusInternalServerError)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this'll do anything at this point if the encode fails mid-encode, but can't hurt I suppose.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it at least overwrites the previously set "Content-Type", "application/json" and send back an error.

@doringeman doringeman merged commit 8907b3d into docker:main Jul 11, 2025
1 check passed
doringeman pushed a commit to doringeman/model-runner that referenced this pull request Sep 23, 2025
* Added workflow to package a safetensors model

* Build llama-converter image

* No need to install git-lfs

* Use linux/amd6 platform

* No need for intermediate image stage llama-converter

* remove duplicated FROM

* Update README.md

* add prerpare-matrix step as gguf workflow

* fix example

* llamacpp tag always came from the input

* Update README.md
doringeman pushed a commit to doringeman/model-runner that referenced this pull request Sep 24, 2025
* Added workflow to package a safetensors model

* Build llama-converter image

* No need to install git-lfs

* Use linux/amd6 platform

* No need for intermediate image stage llama-converter

* remove duplicated FROM

* Update README.md

* add prerpare-matrix step as gguf workflow

* fix example

* llamacpp tag always came from the input

* Update README.md
doringeman pushed a commit to doringeman/model-runner that referenced this pull request Oct 2, 2025
use docker API client interfaces instead of concrete type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants