This repository was archived by the owner on Sep 29, 2025. It is now read-only.
Merged
Conversation
600ddde to
8445d6d
Compare
Signed-off-by: Emily Casey <emily.casey@docker.com>
Signed-off-by: Emily Casey <emily.casey@docker.com>
doringeman
reviewed
Jul 24, 2025
distribution/client.go
Outdated
| break | ||
| } | ||
| if err != nil { | ||
| log.Fatalf("Error reading blobs from stream: %v", err) |
Contributor
There was a problem hiding this comment.
Let's not crash on cancellation.
I hit this by cancelling a docker model package with a large GGUF.
Suggested change
| log.Fatalf("Error reading blobs from stream: %v", err) | |
| if strings.Contains(err.Error(), "unexpected EOF") { | |
| c.log.Infof("Model load interrupted (likely cancelled): %v", err) | |
| return "", fmt.Errorf("model load interrupted: %w", err) | |
| } | |
| return "", fmt.Errorf("reading blob from stream: %w", err)``` |
Contributor
There was a problem hiding this comment.
Looks good, but would errors.Is(err, io.ErrUnexpectedEOF) work here?
Contributor
There was a problem hiding this comment.
Sure! Changed in e3f196c.
Also tested locally with with model-runner, all good.
ilopezluna
approved these changes
Jul 24, 2025
xenoscopic
approved these changes
Jul 24, 2025
Contributor
xenoscopic
left a comment
There was a problem hiding this comment.
LGTM, though I agree we should try to find an alternative to the Fatalf before merging.
Signed-off-by: Dorin Geman <dorin.geman@docker.com>
xenoscopic
approved these changes
Jul 24, 2025
doringeman
added a commit
to docker/model-runner
that referenced
this pull request
Sep 23, 2025
* Adds support for packaging/loading models to/from TAR archive Signed-off-by: Emily Casey <emily.casey@docker.com> * Check for blobs when writing manifest Signed-off-by: Emily Casey <emily.casey@docker.com> * LoadModel: don't crash on cancellation Signed-off-by: Dorin Geman <dorin.geman@docker.com> --------- Signed-off-by: Emily Casey <emily.casey@docker.com> Signed-off-by: Dorin Geman <dorin.geman@docker.com> Co-authored-by: Dorin Geman <dorin.geman@docker.com>
doringeman
added a commit
to docker/model-runner
that referenced
this pull request
Sep 23, 2025
* Adds support for packaging/loading models to/from TAR archive Signed-off-by: Emily Casey <emily.casey@docker.com> * Check for blobs when writing manifest Signed-off-by: Emily Casey <emily.casey@docker.com> * LoadModel: don't crash on cancellation Signed-off-by: Dorin Geman <dorin.geman@docker.com> --------- Signed-off-by: Emily Casey <emily.casey@docker.com> Signed-off-by: Dorin Geman <dorin.geman@docker.com> Co-authored-by: Dorin Geman <dorin.geman@docker.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
distribution.Client.tarball.TargetCLI Usage
model-distribution-tool loadIntroduces
loadcommand which loads model from the archive at into the store and optionally applies .model-distribution-tool package --fileAdds
--file <path>flag topackagecommand, which results in the model being written to a TAR archive at the given<path>instead of being pushed to the registry.LoadModelwithdistribution.ClientExpects to read a TAR archive from
rcformatted as described below and applies the given tag, writing progress toprogressWriter.Format
package and load expect/produce models with any number of blobs entries with name
blobs/sha256/<hash>and 1manifest.json. Example:TODO