Docker
vLLM publishes an official image for the OpenAI-compatible server. On Docker Hub the name is still vllm/vllm-openai (tags such as :latest or a pinned version). The image already contains the CUDA build and entrypoint; you supply GPU access, ports, and a Hugging Face cache. Flags drift slightly—check Using Docker.
The host needs the NVIDIA Container Toolkit and a working nvidia-smi. This is not a CPU image.
Minimal run
Recent official examples use a tiny Qwen repo. This course stays on small ungated models (you may swap in whatever the docs currently show, e.g. Qwen/Qwen3-0.6B):
Arguments after the image name are engine args, the same family as vllm serve (--tensor-parallel-size, --quantization, …).
Check:
Pick GPUs and tensor parallel
Two GPUs with tp=2:
--gpus syntax varies by Docker / NVIDIA plugin version—see docker run --help on your machine.
Compose sketch
Compose GPU syntax is either deploy.resources or a gpus: key depending on file version. Check current Docker docs. Sibling services should call http://vllm:8000/v1, not localhost.
Security and operations
- Pin a version tag (
v0.x.y) in production; do not float onlatestforever. - Do not bake
HF_TOKENinto a public DockerfileENV. - Put a reverse proxy in front of any public port; a Docker network is not authentication.
- Logs tell you whether weights finished downloading, NCCL failed, or you OOM’d.
- AMD / Intel variants exist (
vllm/vllm-openai-rocm,vllm/vllm-openai-xpu, …—check current docs). Out of scope here.
Root vs non-root UIDs (OpenShift, volume permissions) are documented on the official Docker page; unwritable cache mounts fail Hub downloads.
Troubleshooting
Get pip serving working on the host first; then you can tell CUDA problems from Docker problems.
Next steps
- Serving
- Practical Examples
- Docker tutorial on this site