Skip to content

Add Docker Model Runner documentation and compatibility tests#190

Open
pradhyum6144 wants to merge 4 commits intomodelpack:mainfrom
pradhyum6144:feat/docker-model-runner
Open

Add Docker Model Runner documentation and compatibility tests#190
pradhyum6144 wants to merge 4 commits intomodelpack:mainfrom
pradhyum6144:feat/docker-model-runner

Conversation

@pradhyum6144
Copy link
Contributor

@pradhyum6144 pradhyum6144 commented Mar 20, 2026

Summary

  • Add docs/docker-model-runner.md — comprehensive guide for using Docker Model Runner with ModelPack models, covering detection mechanism, field mappings, media type conversions, and the OpenAI-compatible API
  • Add schema/compat_test.go — downstream compatibility validation tests (6 tests, 27 subtests) that verify JSON field names, media type constants, and round-trip serialization to prevent accidental breakage for downstream consumers
  • Add Docker Model Runner links to docs/getting-started.md (Model Management Tools, Choose Your Tool, Next Steps, Additional Resources)

Closes #151

Test plan

  • All new tests pass (go test ./schema/ -run TestDownstream -v)
  • Existing schema tests unaffected
  • Verify documentation renders correctly on GitHub
  • Verify links in getting-started.md resolve correctly

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the ModelPack ecosystem by providing detailed documentation for integrating ModelPack models with Docker Model Runner, enabling users to easily pull and run AI models from OCI registries. Concurrently, it introduces a suite of compatibility tests to safeguard against breaking changes in the ModelPack schema, ensuring seamless interoperability for tools that rely on its structure.

Highlights

  • Documentation: Added a new comprehensive guide for using Docker Model Runner with ModelPack models, covering detection, field mappings, media type conversions, and the OpenAI-compatible API.
  • Compatibility Tests: Introduced new Go tests (schema/compat_test.go) to validate ModelPack schema compatibility, ensuring stability for downstream consumers like Docker Model Runner by verifying JSON field names, media type constants, and round-trip serialization.
  • Getting Started Updates: Integrated Docker Model Runner links into the docs/getting-started.md guide across various sections, including Model Management Tools, Choose Your Tool, Next Steps, and Additional Resources.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces comprehensive documentation for using Docker Model Runner with ModelPack and adds a valuable suite of downstream compatibility tests. The documentation is well-structured, and the tests are thorough, ensuring that future changes won't accidentally break compatibility with consumers like Docker. I have one suggestion to improve the clarity of the field mapping documentation.

Comment on lines +86 to +97
| ModelPack Field | Docker Field | Description |
|---|---|---|
| `descriptor.createdAt` | `created` | Model creation timestamp |
| `descriptor.name` | `descriptor.name` | Model name |
| `descriptor.family` | `descriptor.family` | Model family |
| `descriptor.description` | `descriptor.description` | Model description |
| `descriptor.licenses` | `descriptor.licenses` | License information |
| `config.paramSize` | `parameters` | Model parameter count |
| `config.format` | `config.format` | Model format (e.g., GGUF) |
| `config.quantization` | `config.quantization` | Quantization method |
| `config.architecture` | `config.architecture` | Model architecture |
| `modelfs` | `rootfs` | Layer content addresses |
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The field mapping table is a bit ambiguous. While some fields show a clear mapping (e.g., descriptor.createdAt -> created), others seem to map to themselves (e.g., descriptor.name -> descriptor.name). This makes it difficult to understand the final structure of the object in Docker's internal format.

To improve clarity, could you please revise the table to better illustrate the transformation? For example:

  • Does descriptor.name remain within a descriptor object in Docker's format?
  • Is created (from descriptor.createdAt) a top-level field, or is it within a descriptor object (e.g., descriptor.created)?

A clearer representation of the final structure would greatly help users understand the mapping.

Add documentation for using Docker Model Runner with ModelPack models,
including detection mechanism, field mappings, and media type conversions.
Add downstream compatibility validation tests to prevent accidental
breakage of fields and media types that downstream consumers depend on.
Closes modelpack#151
Signed-off-by: pradhyum6144 <pradhyum314@gmail.com>
Signed-off-by: pradhyum6144 <pradhyum314@gmail.com>
Split the mapping table into renamed vs pass-through fields to make
the Docker internal structure clearer per review feedback.
Signed-off-by: pradhyum6144 <pradhyum314@gmail.com>
@pradhyum6144 pradhyum6144 force-pushed the feat/docker-model-runner branch from e7e2f63 to 9388d01 Compare March 20, 2026 12:44
- Add explicit docker model pull step before run
- Clarify that runtime compatibility depends on supported formats (GGUF)
- Reference minimum release version (v1.0.19) instead of PR number
- Tighten wording to distinguish packaging from runtime compatibility

Signed-off-by: pradhyum6144 <pradhyum314@gmail.com>
@pradhyum6144
Copy link
Contributor Author

These changes should not be in this repo. The Docker Model Runner validation/tests belong in the model-runner repo, not model-spec.

@rishi-jat The compatibility validation tests are here because that's exactly what the maintainer requested. From bergwolf's comment on #151:

"Add downstream users compatibility validation tests in model-spec to ensure we do not break backward compatibility by accident"

The tests in schema/compat_test.go verify that model-spec's own field names and media type constants remain stable so downstream consumers like Docker Model Runner don't break when the spec evolves. This follows the same pattern as the existing schema/config_test.go which already lives in this repo.

I'd recommend reading through the issue requirements and the actual code changes before concluding where they belong.

@rishi-jat
Copy link

rishi-jat commented Mar 22, 2026

Ah, I made mistake made opinion without seeing the real changes - my bad.

Looking at it again, the overall direction makes sense. The only concern now is around scope: some of the tests seem to encode Docker Model Runner–specific assumptions, which could couple the spec to a single consumer.

If we keep the assertions focused on general spec guarantees, this looks good. Thanks for the contribution.

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.

help docker-runner compatible with modelpack

2 participants