Docker Model Runner lets you pull and run AI models with the same Docker tools you already use for containers. One command downloads a model, another chats with it, and your apps get an OpenAI-compatible API on your own machine.
It’s built into Docker Desktop and available as a plugin for Docker Engine on Linux, with GPU support for NVIDIA, Apple Silicon and more.
This guide shows how to enable Docker Model Runner, pull models from Docker Hub and Hugging Face, call the API from your host and from containers, add models to Docker Compose, and fix common errors. It follows Docker’s official docs as of November 2026.
- What: Docker’s built-in way to run local LLMs, generally available since September 2025.
- Enable: Docker Desktop > Settings > AI > Enable Docker Model Runner. On Linux: install
docker-model-plugin. - Try it:
docker model run ai/smollm2. - API from host:
http://localhost:12434/engines/v1(turn on host-side TCP in Desktop). - API from containers:
http://model-runner.docker.internal. - Engines: llama.cpp (default, GGUF), vLLM (NVIDIA), Diffusers (images).
What Docker Model Runner Is
- Models as Docker artifacts: models are pulled, tagged, pushed and listed like images.
- Several API styles: OpenAI-compatible, Ollama-compatible and Anthropic-style endpoints.
- Load on demand: models are cached locally, load when a request arrives, and unload when idle.
- Many sources: Docker Hub’s
ai/namespace, Hugging Face and any OCI registry. - Compose support: declare models next to your services so your app and its model start together.
It’s a great fit if your app already runs in Docker and you want a local model without installing a separate tool.
Requirements
| Platform | Requirement |
|---|---|
| macOS | Docker Desktop 4.40 or newer; Apple Silicon supported |
| Windows (x64) | Docker Desktop 4.41 or newer; NVIDIA GPU with driver 576.57+ for GPU inference |
| Windows (ARM64) | Qualcomm Adreno 6xx or later through OpenCL |
| Linux (Docker Engine) | docker-model-plugin package; CPU, NVIDIA CUDA (driver 575.57.08+), AMD ROCm or Vulkan |
| Compose models | Docker Compose 2.38.0 or newer |
Check that you have enough memory for the models you plan to run. Our RAM guide for local AI has a quick sizing table.
Enable Docker Model Runner
Docker Desktop (Mac and Windows):
- Update Docker Desktop to the latest version.
- Open Settings > AI.
- Tick “Enable Docker Model Runner”.
- On Windows with NVIDIA, also tick “Enable GPU-backed inference”.
- Tick “Enable host-side TCP support” if apps on your PC (not in containers) will call the API. The default port is 12434.
- Apply and restart.
Linux with Docker Engine:
# Debian / Ubuntu
sudo apt-get update && sudo apt-get install docker-model-plugin
# Fedora / RHEL
sudo dnf install docker-model-plugin
On Docker Engine, TCP access on port 12434 is on by default. Check the install with docker model version.
Pull and Run Your First Model
- Run a small test model:
docker model run ai/smollm2This pulls the model and opens an interactive chat.
- Pull a specific size and quantization:
docker model pull ai/smollm2:360M-Q4_K_M - Pull a GGUF from Hugging Face:
docker model pull hf.co/bartowski/Llama-3.2-1B-Instruct-GGUF - Send a one-off prompt:
docker model run ai/smollm2 "Explain Docker volumes in two sentences" - See what you have:
docker model list.
Browsing Hugging Face for GGUF files? See how to download models from Hugging Face for picking a quant.
docker model Command Cheat Sheet
| Command | What it does |
|---|---|
docker model pull <model> |
Download a model |
docker model run <model> ["prompt"] |
Chat or send one prompt |
docker model list |
List local models |
docker model ps |
Show loaded models |
docker model rm <model> |
Delete a model |
docker model inspect / show |
Model details |
docker model unload |
Free memory |
docker model search |
Find models |
docker model tag / push / package |
Publish your own models to a registry |
docker model status / logs / version |
Check the runner |
docker model df / purge |
Disk use and cleanup |
docker model bench |
Benchmark a model |
docker model install-runner (and start, stop, restart) |
Manage the runner on Docker Engine |
Use the OpenAI-Compatible API
| Calling from | Base URL |
|---|---|
| Your host (TCP enabled) | http://localhost:12434/engines/v1 |
| A container (Docker Desktop) | http://model-runner.docker.internal/engines/v1 |
| A container (Docker Engine) | http://172.17.0.1:12434/engines/v1 |
curl http://localhost:12434/engines/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"ai/smollm2","messages":[{"role":"user","content":"Hello"}]}'
Python with the OpenAI SDK:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:12434/engines/v1", api_key="none")
r = client.chat.completions.create(model="ai/smollm2",
messages=[{"role": "user", "content": "Hello"}])
print(r.choices[0].message.content)
- Other OpenAI paths:
/completions,/embeddingsand/modelsunder the same base. - Ollama-style paths:
/api/tags,/api/chatand/api/generate. - No authentication: the API has no login, so don’t expose port 12434 to the internet.
Apps like Open WebUI can connect using the OpenAI base URL above.
Add Models to Docker Compose
services:
chat-app:
image: my-chat-app
models:
llm:
endpoint_var: AI_MODEL_URL
model_var: AI_MODEL_NAME
models:
llm:
model: ai/smollm2
context_size: 4096
- Declare the model in the top-level
models:section. - Attach it to a service under that service’s
models:. - Read the env vars in your app. With the short form
models: [llm], Compose setsLLM_URLandLLM_MODELfor you. - Run
docker compose up. Compose pulls the model and starts your app.
This needs Compose 2.38.0 or newer.
Inference Engines
| Engine | Platforms | Model format |
|---|---|---|
| llama.cpp (default) | All | GGUF |
| vLLM | NVIDIA on Linux x86_64 or Windows WSL2 | Safetensors |
| Diffusers | NVIDIA on Linux | Image generation models |
For a deeper look at how vLLM and llama.cpp differ, see vLLM vs llama.cpp vs Ollama.
Docker Model Runner vs Ollama
| Docker Model Runner | Ollama | |
|---|---|---|
| Install | Built into Docker Desktop | Separate app |
| Model source | Docker Hub, Hugging Face, any OCI registry | Ollama library, Hugging Face |
| APIs | OpenAI, Ollama-style, Anthropic-style | Ollama, OpenAI-compatible |
| Compose integration | Native | Run as a container |
| Best for | Teams already on Docker | Simple personal use |
Prefer Ollama in containers instead? Our Ollama Docker guide covers it.
Tips
- Start small: test with
ai/smollm2before pulling multi-gigabyte models. - Pin tags: use a specific tag like
:360M-Q4_K_Mso builds stay reproducible. - Clean up:
docker model dfshows disk use; remove models you no longer need. - Keep it local: leave host-side TCP off unless a host app needs it.
- Watch logs:
docker model logsshows load errors and request details when something fails.
Example: A Local Chatbot Project in Five Minutes
Here’s a practical way to see how the pieces fit. This small project gives a Python script its own local model, with no API keys and no cloud costs.
- Create a folder with a
compose.yamland anapp.py. - In compose.yaml, declare a model (for example
ai/smollm2) in the top-levelmodels:section and attach it to your app service with the short formmodels: [llm]. - In app.py, read the
LLM_URLandLLM_MODELenvironment variables and pass them to the OpenAI SDK as the base URL and model name. - Run
docker compose up. Compose pulls the model if needed, starts the runner and launches your app with the right settings. - Swap models later by changing one line in compose.yaml, with no code changes.
The same pattern works for a web app, a Discord bot or a background worker. Because the model is declared in Compose, anyone on your team gets the same setup with one command.
When the project grows, move to a bigger model from Docker Hub or Hugging Face, and use docker model bench to compare speed on your hardware before you commit.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| “docker: ‘model’ is not a docker command” | CLI plugin not linked | On macOS: ln -s /Applications/Docker.app/Contents/Resources/cli-plugins/docker-model ~/.docker/cli-plugins/docker-model |
| Host app can’t connect | Host-side TCP is off | Enable it in Settings > AI and use port 12434 |
| Container can’t resolve model-runner.docker.internal | Compose networking | Add extra_hosts: model-runner.docker.internal:host-gateway and use port 12434 |
| Slow on Windows | GPU inference not enabled | Tick “Enable GPU-backed inference” and update the NVIDIA driver |
| No GPU on Linux | Old driver | Update to driver 575.57.08 or newer |
| Out of memory | Model too large | Use a smaller model or lower quantization |
Compose ignores models: |
Old Compose | Update to 2.38.0 or newer |
FAQ
Is Docker Model Runner free?
It’s included with Docker Desktop and the Docker Engine plugin. Docker Desktop’s own license terms still apply to larger companies.
What port does Docker Model Runner use?
12434 for host-side TCP access, with the OpenAI API at /engines/v1.
Can Docker Model Runner use my GPU?
Yes: Apple Silicon, NVIDIA on Windows and Linux, and AMD ROCm or Vulkan on Docker Engine.
Can I run Hugging Face models?
Yes. Pull GGUF models with docker model pull hf.co/user/repo.
Does it work on Linux without Docker Desktop?
Yes. Install the docker-model-plugin package for Docker Engine.
Is Docker Model Runner compatible with the OpenAI SDK?
Yes. Point the SDK’s base URL at http://localhost:12434/engines/v1.
Should I use Docker Model Runner or Ollama?
Use Docker Model Runner if your apps already run in Docker or Compose. Ollama is simpler for personal chat.




