docker-model-runner
Skill656 starsChanged 8 months agoApache-2.0View on GitHub
Skills for using Docker Model Runner to run local LLM inference
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
When helping users with local LLM inference using Docker Model Runner:
- Very specific: line 22
Pull models: before running: docker model pull <model>
- Very specific: line 80
Use smaller models (like ai/smollm2) for faster responses during development
- Distinctive: line 83
Use the OpenAI-compatible API for integration with existing tools
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Docker Model Runner
Docker Model Runner (DMR) makes it easy to run AI models locally using Docker. This skill helps you effectively use Docker Model Runner for local LLM inference in your development workflow.
Workflow
When helping users with local LLM inference using Docker Model Runner:
- Check if Docker Model Runner is available by running
docker model version - List available models with
docker model listto see what's already pulled - Search for models on Docker Hub or HuggingFace:
docker model search <query>to find models- Popular models include:
ai/gemma3,ai/llama3.2,ai/smollm2,ai/qwen3
- Pull models before running:
docker model pull <model> - Run models for inference:
- One-time prompt:
docker model run ai/smollm2 "Your prompt here" - Interactive chat:
docker model run ai/smollm2 - Pre-load model:
docker model run --detach ai/smollm2
- One-time prompt:
- Use the OpenAI-compatible API for programmatic access:
- Endpoint:
http://localhost:12434/engines/llama.cpp/v1/chat/completions - This is compatible with OpenAI client libraries
- Endpoint:
API Usage
Docker Model Runner exposes an OpenAI-compatible REST API:
# Chat completions
curl http://localhost:12434/engines/llama.cpp/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "ai/smollm2",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
}'For Python with the OpenAI library:
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:12434/engines/llama.cpp/v1",
api_key="not-needed" # API key not required for local inference
)
response = client.chat.completions.create(
model="ai/smollm2",
messages=[{"role": "user", "content": "Hello!"}]
)Key Commands
| Command | Description |
docker model run <model> [prompt] | Run a model with optional prompt |
docker model pull <model> | Pull a model from registry |
docker model list | List downloaded models |
docker model search <query> | Search for models |
docker model ps | Show running models |
docker model rm <model> | Remove a model |
docker model inspect <model> | Show model details |
Best Practices
- Use smaller models (like
ai/smollm2) for faster responses during development - Pre-load models with
--detachfor better performance in scripts - Models stay loaded until another model is requested or timeout (5 min)
- Use the OpenAI-compatible API for integration with existing tools
References
See references/docker-model-guide.md for detailed documentation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

