ollama ps shows 100% CPU for a model in the
ollama/ollama container, in this test because the container was started without
--gpus all. Start it again with --gpus all; on this PC the same
model then showed 100% GPU.
The container log says which one you got before you load anything: the
inference compute line reads library=cpu without the flag and
library=CUDA with the card's name when the flag is there.
The error
PS> docker exec fix9-old-cpu ollama ps
NAME ID SIZE PROCESSOR CONTEXT RUNNER UNTIL
qwen2.5:0.5b a8b0c5157701 486 MB 100% CPU 4096 llamacpp 4 minutes from now
PS> cmd /c "docker logs fix9-old-cpu 2>&1" | findstr /I /C:"inference compute" /C:"offloaded" /C:"no compatible" /C:"total_vram" /C:"library="
time=2026-11-10T03:22:30.968Z level=INFO source=types.go:50 msg="inference compute" id=cpu library=cpu compute="" name=cpu description=cpu libdirs=ollama driver="" pci_id="" type="" total="15.5 GiB" available="15.4 GiB"
time=2026-11-10T03:22:30.968Z level=INFO source=routes.go:2562 msg="vram-based default context" total_vram="0 B" default_num_ctx=4096
The container was started like this, with no GPU option (the models folder path is shortened):
docker run -d --name fix9-old-cpu -v "...\fixes9\ollama-docker\models:/root/.ollama/models" -p 127.0.0.1:15973:11434 ollama/ollama
Why it happens
Without a GPU request on docker run, the server in the container reported
one compute device, id=cpu library=cpu, with total_vram="0 B".
The model still loaded and answered, so nothing failed: the only signs were the
PROCESSOR column and that log line. No offloaded ... layers to
GPU line appeared in the log of that container.
The model and the image were the same in both runs; only the --gpus all
option differed. Docker Desktop on this PC uses the WSL 2 backend, and the same option
also let a plain ubuntu:24.04 container run nvidia-smi -L.
The fix
PS> docker run -d --name fix9-old-gpu --gpus all -v "...\fixes9\ollama-docker\models:/root/.ollama/models" -p 127.0.0.1:15974:11434 ollama/ollama
...
PS> docker exec fix9-old-gpu ollama ps
NAME ID SIZE PROCESSOR CONTEXT RUNNER UNTIL
qwen2.5:0.5b a8b0c5157701 483 MB 100% GPU 4096 llamacpp 4 minutes from now
PS> cmd /c "docker logs fix9-old-gpu 2>&1" | findstr /I /C:"inference compute" /C:"offloaded" /C:"no compatible" /C:"total_vram" /C:"library="
time=2026-11-10T03:23:02.534Z level=INFO source=types.go:32 msg="inference compute" id=0 filter_id=0 library=CUDA compute=8.6 name=CUDA0 description="NVIDIA GeForce RTX 3080 Ti Laptop GPU" libdirs=ollama,cuda_v13 driver=13.4 pci_id=0000:01:00.0 type=discrete total="16.0 GiB" available="14.9 GiB"
time=2026-11-10T03:23:02.534Z level=INFO source=routes.go:2562 msg="vram-based default context" total_vram="16.0 GiB" default_num_ctx=4096
time=2026-11-10T03:23:04.195Z level=INFO source=sched.go:665 msg="gpu memory" id=0 library=CUDA available="14.4 GiB" free="14.9 GiB" minimum="457.0 MiB" overhead="0 B"
load_tensors: offloaded 25/25 layers to GPU
The flag goes on the command that creates the container, so here a second container was
created with it. The models sat in a mounted folder, so the new
container found qwen2.5:0.5b without a pull. After the test the model was unloaded with
docker exec fix9-old-gpu ollama stop qwen2.5:0.5b, and ollama ps
then listed nothing.
How it was reproduced
The cached ollama/ollama:latest image (Ollama 0.40.8) on Docker Desktop
with engine 29.9.3 and the WSL 2 backend, Windows 11, an NVIDIA GeForce RTX 3080 Ti
Laptop GPU. A copy of a models folder holding qwen2.5:0.5b was mounted
into each container, and the model was loaded with
docker exec ... ollama run qwen2.5:0.5b "Say hi in three words.". The two
containers ran one after the other; their names are the test's own and both were
removed afterwards.
Frequently asked
- Why does Ollama in Docker show 100% CPU in ollama ps?
- In this test the container had been started without --gpus all. Its log reported inference compute id=cpu library=cpu and total_vram 0 B, and the model ran 100% on the CPU.
- How do I give the Ollama Docker container my NVIDIA GPU on Windows?
- Create the container with docker run --gpus all. On Docker Desktop with the WSL 2 backend the log then named the card with library=CUDA and ollama ps showed 100% GPU.
- How can I check if Ollama in Docker uses the GPU?
- Run docker exec <container> ollama ps after loading a model and read the PROCESSOR column, or search docker logs for inference compute and offloaded N/N layers to GPU.
For the same question with the Windows app instead of Docker, see Is Ollama using my GPU?. More decoded errors in the Fixes category.