You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: add CNCF ModelPack type definitions, conversion utilities, and manifest ArtifactType support
- Add CNCF ModelPack media type constants and Model type (modelpack/types.go)
- Add DockerConfigToModelPack conversion utility (modelpack/convert.go)
- Add CNCFModel partial type for CNCF format support (partial/cncf_model.go)
- Add ArtifactType field to OCI Manifest struct (oci/manifest.go)
- Update partial/mutate layers for format-aware manifest options
- Replace deprecated WithConfigMediaType with WithManifestOptions
- Add model-spec v0.0.7 dependency
* feat: add --format flag to package command and CNCF build support in builder
- Add BuildFormat type and WithFormat option to builder for Docker/CNCF selection
- Implement CNCF artifact creation with media type remapping and config conversion
- Add --format CLI flag to 'docker model package' command with validation
- Improve context size error handling (return error for invalid values)
- Add comprehensive builder tests for CNCF format (artifact validation, media types)
- Add integration tests for CNCF format packaging
- Update CLI reference documentation
* feat: add CNCF model unpacking, detection, and mmproj file handling
- Add DiffID extraction support for CNCF remote layers (oci/remote)
- Add CNCF layer handling in bundle unpack with media type classification
- Detect mmproj files by filepath annotation in CNCF generic weight layers
- Add findModelFileExcluding helper for mmproj-aware model file discovery
- Add comprehensive tests for DiffID extraction, CNCF layer unpacking,
mmproj detection, and parse with CNCF mmproj GGUF files
* fix: harden remappedLayer descriptor and add format auto-detection
Address review feedback from PR #860:
1. remappedLayer.GetDescriptor: pre-compute digest and size at construction
time via newRemappedLayer(), surfacing errors eagerly instead of silently
producing invalid OCI descriptors.
2. FromModel format inheritance: when --format is not explicitly set, auto-
detect the source model's format (Docker vs CNCF) from its config. This
prevents producing inconsistent artifacts when repackaging a CNCF model
without an explicit --format flag.
3. CLI conditional --format: only pass WithFormat to the builder when the
user explicitly sets --format, allowing the builder's auto-detection to
work for the repackaging case.
* fix: preserve determinism in DockerConfigToModelPack and fix normalizeParamSize comment
- Remove time.Now() fallback in DockerConfigToModelPack: propagate
desc.Created directly (nil when unset) so callers control timestamps
and converted configs remain deterministic across runs.
- Fix normalizeParamSize comment to accurately describe its behavior
(lowercases, does not truncate decimal precision).
* refactor: remove normalizeParamSize, pass Parameters as-is to CNCF config
The function only lowercased the string, which is unnecessary — the CNCF
model-spec does not mandate lowercase paramSize values. Pass cfg.Parameters
directly to keep the same value as the Docker format.
* fix: use newRemappedLayer in FromDirectory for consistent digest/size caching
The CNCF path in FromDirectory was constructing remappedLayer directly,
bypassing the digest/size pre-computation added in newRemappedLayer.
This left cachedDigest/cachedSize zero-valued for layers that aren't
descriptor providers, producing invalid OCI descriptors.
---------
Co-authored-by: Eric Curtin <eric.curtin@docker.com>
0 commit comments