Skip to content

add modelfile support to docker model package#903

Draft
areebahmeddd wants to merge 4 commits intodocker:mainfrom
areebahmeddd:feat/modelfile-support
Draft

add modelfile support to docker model package#903
areebahmeddd wants to merge 4 commits intodocker:mainfrom
areebahmeddd:feat/modelfile-support

Conversation

@areebahmeddd
Copy link
Copy Markdown
Contributor

@areebahmeddd areebahmeddd commented May 6, 2026

changes

completes #628

  • added --file / -f flag to docker model package to load and apply a modelfile

closes #613

Copy link
Copy Markdown
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 support for Modelfile in the package command via a new --file flag, allowing users to define model sources and parameters in a configuration file. The review feedback identifies critical improvements for the parser to correctly handle file paths with spaces or quotes and suggests ignoring unknown instructions to maintain compatibility with standard Modelfiles. Additionally, the feedback recommends refining error messages to accurately reflect the new flag and improve user empathy.

Comment thread cmd/cli/commands/modelfile.go Outdated
Comment thread cmd/cli/commands/modelfile.go Outdated
Comment thread cmd/cli/commands/package.go
@areebahmeddd
Copy link
Copy Markdown
Contributor Author

the command is docker model package --file ./Modelfile, not a new docker model create subcommand to match the docker build -f Dockerfile convention

@ericcurtin
Copy link
Copy Markdown
Contributor

ericcurtin commented May 6, 2026

@areebahmeddd thanks and nice work!

Two things, I think this should be "docker model build" or "docker model create", it's what people are used to from docker and ollama and it makes things simpler. Also, Ollama-type models are generally out of scope for this projects as they are not standards compliant (although we do have an Ollama-compatible API). I would like to see if there are plans to define a standard with the ModelPack folk before we proceed:

modelpack/model-spec#208

@areebahmeddd
Copy link
Copy Markdown
Contributor Author

Two things, I think this should be "docker model build" or "docker model create"

sure, i’ll update it post-discussion in the modelpack issue 🙂

Also, Ollama-type models are generally out of scope for this projects as they are not standards compliant (although we do have an Ollama-compatible API)

interesting, i just read about modelpack and its spec. ollama’s modelfile seems to not follow since it uses its own binary blob format. i agree to wait for a definitive plan from the modelpack team

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.

Add support for Modelfile

2 participants