{"record":{"id":"51bb74baf0cfad77","repo":"abiosoft/colima","slug":"failed-to-read-model-manifest-w","errorCode":null,"errorMessage":"failed to read model manifest: %w","messagePattern":"failed to read model manifest: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"model/docker.go","lineNumber":61,"sourceCode":"}\n\n// findGGUFPath finds the GGUF file path for a model inside the docker-model-runner container.\n// It handles both Docker registry models (bundle path) and HuggingFace models (blob path via manifest).\n// For models without a bundle, it creates the bundle structure by hard-linking the blob.\nfunc findGGUFPath(guest environment.VM, modelHash string) (string, error) {\n\t// Standard bundle path used by Docker Model Runner for all models\n\tbundlePath := fmt.Sprintf(\"/models/bundles/sha256/%s/model/model.gguf\", modelHash)\n\n\t// Check if bundle already exists\n\tif err := guest.RunQuiet(\"docker\", \"exec\", \"docker-model-runner\", \"test\", \"-f\", bundlePath); err == nil {\n\t\treturn bundlePath, nil\n\t}\n\n\t// Bundle doesn't exist - read manifest to find the GGUF blob and create the bundle\n\tmanifestPath := fmt.Sprintf(\"/models/manifests/sha256/%s\", modelHash)\n\toutput, err := guest.RunOutput(\"docker\", \"exec\", \"docker-model-runner\", \"cat\", manifestPath)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to read model manifest: %w\", err)\n\t}\n\n\tvar manifest ociManifest\n\tif err := json.Unmarshal([]byte(output), &manifest); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to parse model manifest: %w\", err)\n\t}\n\n\t// Find the GGUF layer (mediaType contains \"gguf\")\n\tvar blobPath string\n\tfor _, layer := range manifest.Layers {\n\t\tif strings.Contains(layer.MediaType, \"gguf\") {\n\t\t\tif blobHash, ok := strings.CutPrefix(layer.Digest, \"sha256:\"); ok {\n\t\t\t\tblobPath = fmt.Sprintf(\"/models/blobs/sha256/%s\", blobHash)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/model/docker.go#L43-L79","documentation":"findGGUFPath materializes a model bundle: if /models/bundles/sha256/<hash>/model/model.gguf is missing it reads the OCI manifest via guest.RunOutput(\"docker\",\"exec\",\"docker-model-runner\",\"cat\",\"/models/manifests/sha256/<hash>\"). This error means that docker exec itself failed: the manifest file does not exist or is unreadable inside the runner container (container not running, blob store garbage-collected, hash pointing at a manifest that was never created).","triggerScenarios":"Serving a model whose bundle was never created by Docker Model Runner; the docker-model-runner container is stopped/restarting so docker exec errors; modelInfo.Hash() resolves to a manifest that was pruned by disk cleanup or belongs to an older storage layout.","commonSituations":"Model pulled under an older Docker/Model Runner version and never migrated; VM disk pressure triggered GC of /models/manifests; runner container half-started right after colima start; retrying serve after a partially failed pull.","solutions":["Re-pull the model (docker model pull <name> inside colima ssh) so a fresh manifest exists","Recreate the runner container: docker model start-runner, or colima's SetupOrUpdateDocker (docker model reinstall-runner)","Verify the manifest exists: colima ssh -- docker exec docker-model-runner ls /models/manifests/sha256/ and compare with the hash reported by docker model inspect","If the store is corrupted, remove the model (docker model rm <name>) and pull again"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before serve: confirm runner is up and the manifest exists.\nfunc manifestExists(guest environment.VM, modelHash string) bool {\n    return guest.RunQuiet(\"docker\", \"exec\", \"docker-model-runner\",\n        \"test\", \"-f\", \"/models/manifests/sha256/\"+modelHash) == nil\n}","typeGuard":null,"tryCatchPattern":"output, err := guest.RunOutput(\"docker\", \"exec\", \"docker-model-runner\", \"cat\", manifestPath)\nif err != nil {\n    return \"\", fmt.Errorf(\"failed to read model manifest: %w (runner up? manifest at %s?)\", err, manifestPath)\n}","preventionTips":["Always let EnsureDockerModel/ensureDockerModelRunner run before serve so the container is up","Re-pull models after runner reinstallation or aggressive disk cleanup instead of relying on old manifests","Treat repeated manifest-read failures as a signal to docker model rm + re-pull"],"tags":["docker","model-runner","manifest","container-exec"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}