Docker Model Runner Brings vLLM to macOS with Apple Silicon
Docker Model Runner now supports vllm-metal, a vLLM plugin that runs MLX-format models on Apple Silicon's Metal GPU behind the same OpenAI- and Anthropic-compatible APIs used on Linux and WSL2. The plugin keeps vLLM's engine, scheduler and API server unchanged. Platform, worker and model-runner layers sit underneath, with MLX doing inference and PyTorch handling Hugging Face loading and weight conversion. Unified memory allows zero-copy tensors, and paged attention plus GQA support make KV cache use more efficient. Because Metal has no container GPU passthrough, the backend runs natively on the host from an extracted Python environment. In a Llama 3.2 1B 4-bit benchmark, llama.cpp was about 1.2x faster than vllm-metal and had steadier throughput. Docker has also donated vllm-metal to the vLLM GitHub organization.
Related posts
- Run LLMs Locally with Docker: A Quickstart Guide to Model Runner
Docker mediumAdeptDocker Model Runner, in beta with Docker Desktop 4.40 on Apple silicon, pulls LLMs packaged as OCI artifacts and serves them through an OpenAI-compatible API backed by llama.cpp. Unlike `docker container run`, `docker model run` starts no container. The inference engine runs as a native host process for GPU acceleration, loads models on demand, and unloads them after 5 minutes of inactivity. Containers reach it at model-runner.docker.internal, and host processes can use an optional TCP port (12434), so any OpenAI client such as LangChain4j can point at it by setting a base URL and a model tag of the form {model}:{parameters}-{quantization}.
- Behind the scenes: How we designed Docker Model Runner and what’s next
Docker mediumAdeptDocker Model Runner runs AI models locally and exposes them to both containers and host processes through Docker-style /models endpoints and OpenAI-compatible /engines/{engine}/v1 endpoints. llama.cpp is the first backend, but the API path leaves room for others like vLLM and MLX. On Docker Desktop, inference runs on the host outside the VM to get reliable GPU acceleration, with API calls proxied from the VM; on Docker CE it runs in containers with direct hardware access. A scheduler/loader swaps engine-model process pairs in and out of memory and holds requests until RAM/VRAM frees up rather than returning 503s. Model tensors are kept in a separate store so the engine can mmap them.
- Docker Model Runner on the new NVIDIA DGX Spark: a new paradigm for developing AI locally
Docker mediumAdeptDocker Model Runner now supports NVIDIA DGX Spark, a compact Grace Blackwell GB10 workstation with 128GB of unified memory, for running large models locally. Setup means installing the docker-model-plugin on DGX OS's preinstalled Docker Engine and pulling a model such as ai/qwen3-coder, which is exposed through an OpenAI-compatible API on port 12434 with GPUs passed through nvidia-container-runtime. SSH port forwarding lets a laptop use the Spark as a remote model host and view its GPU dashboard, shown with a sample OpenCode configuration that points the coding agent at the local Qwen3-Coder endpoint.
- Using Stable Diffusion with Core ML on Apple Silicon
Hugging Face mediumAdeptStable Diffusion can run on Apple Silicon via Core ML using Apple's ml-stable-diffusion repo, with pre-converted checkpoints for v1.4, v1.5, v2 base and v2.1 base hosted on the Hugging Face Hub. Each model comes in 'original' attention (CPU/GPU only, sometimes faster) or 'split_einsum' attention (also runs on the Neural Engine), packaged either as ML Packages for Python or compiled mlmodelc bundles for Swift. The best result on an M1 Max was 18s per image, using original attention with all compute units on macOS Ventura 13.1, which is required to avoid black images. Step-by-step download and inference commands are given for Python and Swift, plus a pointer to Apple's conversion script for custom fine-tuned models.
- How to Build, Run, and Package AI Models Locally with Docker Model Runner
Docker mediumAdeptDocker Model Runner, enabled as a beta feature in Docker Desktop 4.40+, pulls GGUF-format LLMs from Docker Hub or Hugging Face and runs them locally via the `docker model` CLI or an OpenAI-compatible HTTP endpoint on localhost. The guide walks through enabling the feature, pulling, tagging and pushing models to a local registry, one-shot and interactive prompts, curl calls to the chat completions API, and packaging your own .gguf file with a license as an OCI artifact. Constraints noted: only GGUF is supported, one model is loaded at a time, and models unload after 5 minutes idle. Compose v2.35+ can declare models as services and inject connection URLs into dependent containers.