Docker Model Runner (DMR) is Docker's built-in way to pull and run large language models locally: enable it, then run docker model run ai/smollm2. It also serves an OpenAI-compatible API, at http://localhost:12434/engines/v1 once host TCP access is on.
Everything below comes from Docker's documentation, checked in November 2026. Docker changes this feature often, so confirm flags against docker model --help on your version.
What Docker Model Runner is
DMR runs models as a host process managed by Docker rather than as a normal container. You download a model once, it is cached locally, and Docker loads it into memory only when a request arrives. When the model sits idle, it is unloaded again. The model files are packaged as OCI artifacts, so they live in registries the same way images do.
Models can come from three places, according to the docs: Docker Hub (the ai namespace at hub.docker.com/u/ai), any OCI-compliant registry, and Hugging Face. The default inference engine is llama.cpp, which uses quantized GGUF files and works on all supported platforms. The docs also list vLLM (Safetensors, for NVIDIA GPUs on Linux x86_64 or Windows with WSL2) and Diffusers (image generation, NVIDIA GPUs on Linux).
What you need
| Platform | Requirement from the docs |
|---|---|
| macOS | Apple Silicon |
| Windows (amd64) | NVIDIA GPU with driver 576.57 or later |
| Windows (arm64) | OpenCL for Adreno, and a Qualcomm Adreno GPU (6xx series or later) |
| Linux (Docker Engine) | CPU, NVIDIA CUDA (driver 575.57.08 or later), AMD ROCm, or Vulkan |
If you have not installed Docker Desktop yet, see how to install Docker Desktop on Windows first.
How to enable Docker Model Runner
Docker Desktop
- Open Settings and go to the AI tab.
- Select Enable Docker Model Runner.
- Optional, on Windows with a supported NVIDIA GPU: select Enable GPU-backed inference.
- Optional: select Enable host-side TCP support and enter a port in the Port field. You need this to call the API from
localhost. - Optional: under CORS Allows Origins, choose the origins that may call the API from a browser, such as
http://localhost:3131.
If docker model is not recognized on macOS, the docs give this fix, which links the CLI plugin into place:
ln -s /Applications/Docker.app/Contents/Resources/cli-plugins/docker-model ~/.docker/cli-plugins/docker-model
Docker Engine on Linux
On Ubuntu or Debian, install the plugin package:
sudo apt-get update
sudo apt-get install docker-model-plugin
On RPM-based distributions:
sudo dnf update
sudo dnf install docker-model-plugin
Then verify:
docker model version
docker model run ai/smollm2
With Docker Engine, TCP access is on by default, on port 12434.
How to pull and run a model
Pull a specific tag from Docker Hub, or a GGUF model from Hugging Face by its hf.co/ name:
docker model pull ai/smollm2:360M-Q4_K_M
docker model pull hf.co/bartowski/Llama-3.2-1B-Instruct-GGUF
Then run one. Without a prompt, docker model run opens an interactive chat. With a prompt, it answers once and exits:
docker model run ai/smollm2
docker model run ai/smollm2 "Explain what a GGUF file is in two sentences."
The CLI reference describes run as "Run a model and interact with it using a submitted prompt or chat mode". In Docker Desktop you can do the same from Models > Docker Hub (pull) and Models > Local (the play button).
The docker model commands you will use
| Command | What it does (Docker's description) |
|---|---|
docker model list | List the models pulled to your local environment |
docker model ps | List running models |
docker model status | Check if the Docker Model Runner is running |
docker model unload | Unload running models |
docker model rm | Remove local models downloaded from Docker Hub |
docker model df | Show Docker Model Runner disk usage |
docker model logs | Fetch the Docker Model Runner logs |
docker model requests | Fetch requests+responses from Docker Model Runner |
docker model search | Search for models on Docker Hub and HuggingFace |
Models are large, so docker model df is a quick way to see how much disk space they use before you pull another one. To change how much context a model gets, the docs show docker model configure --context-size 8192 ai/qwen2.5-coder.
How to call the Docker Model Runner API
The API follows the OpenAI format. The base URL depends on where the caller runs, per the API reference:
| Caller | Base URL |
|---|---|
| Container (Docker Desktop) | http://model-runner.docker.internal/engines/v1 |
| Container (Docker Engine) | http://172.17.0.1:12434/engines/v1 |
| Host over TCP | http://localhost:12434/engines/v1 |
The endpoints under that base URL are /models, /models/{namespace}/{name}, /chat/completions, /completions and /embeddings. A chat request from the host:
curl http://localhost:12434/engines/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "ai/smollm2",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'
Because it is OpenAI-compatible, the official Python SDK works by changing the base URL. The SDK insists on a key value, so pass any placeholder:
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:12434/engines/v1",
api_key="not-needed",
)
response = client.chat.completions.create(
model="ai/smollm2",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
There is also an Ollama-compatible API on the same port, with endpoints such as /api/tags, /api/chat and /api/generate. For example, curl http://localhost:12434/api/tags lists models in the Ollama format. If you want to compare the two tools in depth, read how to run an LLM locally with Ollama.
To run it alongside your other services, a container on the same machine can reach the runner at the container URLs above, so a Compose service only needs that base URL in an environment variable. If Compose is new to you, Docker Compose explained covers the basics.
Security: the API has no authentication
Docker's documentation states that the Model Runner API has no authentication. Any client that can reach it, including containers on the same Docker network, can pull, load and run models and send inference requests. Enable host-side TCP only if you need it, leave it bound to your own machine, and do not publish port 12434 to a network you do not control.
On privacy, the docs say data collection follows the "Send usage statistics" setting in Docker Desktop. With Docker Engine, HEAD requests to Docker Hub track model names regardless of that setting. Prompts you send to a local model stay on the machine, but the model downloads themselves go through the registry.
If it does not work
docker modelis not recognized. On Linux, installdocker-model-plugin. On macOS, create the symlink shown above.- Connection refused on
localhost:12434. On Docker Desktop, host-side TCP support is optional and the port is whatever you entered, so check the AI settings tab. Rundocker model statusto confirm the runner is up. - Need to see what happened. Run
docker model logs. In Docker Desktop, Models > Requests shows request and response payloads, token usage and generation speed. - Updating on Docker Engine. The docs give
docker model uninstall-runner --images && docker model install-runner, which keeps your local models. Adding--modelsto the uninstall step deletes them too. - Model too slow or out of memory. Pick a smaller or more heavily quantized tag, such as the
360M-Q4_K_Mvariant of smollm2 used above. For hardware advice, see how to choose a GPU for a local LLM.
Frequently asked questions
- What is Docker Model Runner?
- Docker Model Runner (DMR) is a part of Docker that downloads, stores and runs large language models on your own machine. You control it with docker model commands, and it serves OpenAI-compatible and Ollama-compatible APIs. Models are packaged as OCI artifacts, so they can come from Docker Hub, any OCI registry or Hugging Face.
- Is Docker Model Runner an API that needs a key?
- No key is needed. The official Python example passes a placeholder api_key because the OpenAI SDK requires one, and the docs note that DMR does not require an API key. The API also has no authentication at all, so any client that can reach it can run models.
- Does Docker Model Runner need a GPU?
- Not on every platform. On Linux with Docker Engine, the docs list CPU, NVIDIA (CUDA), AMD (ROCm) and Vulkan backends. On macOS it needs Apple Silicon. On Windows (amd64) the docs list NVIDIA GPUs with driver 576.57 or later.
- How is Docker Model Runner different from Ollama?
- Both run models locally and expose a local HTTP API. Docker Model Runner is managed through the docker CLI and Docker Desktop, pulls models as OCI artifacts from Docker Hub or other registries, and also offers an Ollama-compatible API, so some Ollama clients can talk to it.