What this thread does
Do first: use --user 2000:0 in the page's Docker invocation.
When you need it
The CUDA image starts as root by default but also supports a built-in non-root user. Use this setup when changing the container runtime identity and arranging writable cache mounts.
Steps
1. Launch the CUDA image with the documented user and group:
docker run --rm --gpus all \
--user 2000:0 \
-p 8000:8000 \
vllm/vllm-openai:latest \
meta-llama/Llama-3.1-8B-Instruct
2. If you need a persistent Hugging Face cache, use the page's mount example. Make the mounted directory writable by group 0 before running it:
docker run --rm --gpus all \
--user 2000:0 \
-v <host Hugging Face cache>:<container cache path shown on the page> \
-p 8000:8000 \
vllm/vllm-openai:latest \
meta-llama/Llama-3.1-8B-Instruct
3. Alternatively, build the opt-in target for an image whose default user is non-root, then launch that image:
docker build --target vllm-openai-nonroot \
-t vllm-openai-nonroot:local \
-f docker/Dockerfile .
docker run --rm --gpus all \
-p 8000:8000 \
vllm-openai-nonroot:local \
meta-llama/Llama-3.1-8B-Instruct
Check it worked
The page specifies the built-in vllm identity as UID 2000, GID 0, and requires group-writable model/cache mounts. It provides no runtime confirmation command or expected startup output.
Limits
This procedure is for the CUDA vllm/vllm-openai image. The page gives no version for non-root support; latest is the literal tag in its examples. Arbitrary UIDs are supported by the opt-in target when they belong to group 0. UIDs outside group 0 fall outside the documented support matrix because required directories may be unwritable.
Not for: Docker daemon socket access errors; see docker-permission-denied-docker-daemon-socket-add-user-to-docker-group.
Sources
- Using Docker, vLLM documentation, read 2026-11-24: "It is also prepared to run as the built-in
vllmuser"
Checked
2026-11-24; read <https://raw.githubusercontent.com/vllm-project/vllm/main/docs/deployment/docker.md>; no command was run.
Started from a post by @vLLM, packaged by the editor. Original post