mirror of
https://github.com/docker/model-cli
synced 2026-04-05 19:44:06 +00:00
No description
- Go 96.4%
- Makefile 1.9%
- Dockerfile 1.2%
- HCL 0.5%
This repo has been consolidated into model-runner. All future development, issues, and PRs should be directed there. Signed-off-by: Dorin Geman <dorin.geman@docker.com> |
||
|---|---|---|
| .github/workflows | ||
| commands | ||
| desktop | ||
| desktop-module | ||
| docs | ||
| mocks | ||
| pkg | ||
| vendor | ||
| .gitignore | ||
| docker-bake.hcl | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| Makefile | ||
| README.md | ||
Docker Model CLI
⚠️ This Repository Has Moved
This repository has been consolidated into model-runner.
All future development, issues, and pull requests should be directed there.
Please visit the new repository for the latest updates and to contribute.
A powerful command-line interface for managing, running, packaging, and deploying AI/ML models using Docker. This CLI lets you install and control the Docker Model Runner, interact with models, manage model artifacts, and integrate with OpenAI and other backends—all from your terminal.
Features
- Install Model Runner: Easily set up the Docker Model Runner for local or cloud environments with GPU support.
- Run Models: Execute models with prompts or in interactive chat mode, supporting multiline input and OpenAI-style backends.
- List Models: View all models available locally or via OpenAI, with options for JSON and quiet output.
- Package Models: Convert GGUF files into Docker model OCI artifacts and push them to registries, including license and context size options.
- Configure Models: Set runtime flags and context sizes for models.
- Logs & Status: Stream logs and check the status of the Model Runner and individual models.
- Tag, Pull, Push, Remove, Unload: Full lifecycle management for model artifacts.
- Compose & Desktop Integration: Advanced orchestration and desktop support for model backends.
Building
- Clone the repo:
git clone https://github.com/docker/model-cli.git cd model-cli - Build the CLI:
make build - Install Model Runner:
Use./model install-runner--gpu cudafor GPU support, or--gpu autofor automatic detection.
Usage
Run ./model --help to see all commands and options.
Common Commands
model install-runner— Install the Docker Model Runnermodel run MODEL [PROMPT]— Run a model with a prompt or enter chat modemodel list— List available modelsmodel package --gguf <path> --push <target>— Package and push a modelmodel logs— View logsmodel status— Check runner statusmodel configure MODEL [flags]— Configure model runtimemodel unload MODEL— Unload a modelmodel tag SOURCE TARGET— Tag a modelmodel pull MODEL— Pull a modelmodel push MODEL— Push a modelmodel rm MODEL— Remove a model
Example: Interactive Chat
./model run llama.cpp "What is the capital of France?"
Or enter chat mode:
./model run llama.cpp
Interactive chat mode started. Type '/bye' to exit.
> """
Tell me a joke.
"""
Advanced
- Packaging: Add licenses and set context size when packaging models for distribution.
Development
- Run unit tests:
make unit-tests - Generate docs:
make docs