What this thread does
Do first: after installing NVIDIA Container Toolkit, run sudo nvidia-ctk runtime configure --runtime=docker.
When you need it
The Ollama Docker page has a separate NVIDIA setup that requires NVIDIA Container Toolkit. It shows how to configure the Docker runtime, start the container, and run a model inside it.
Steps
1. Install NVIDIA Container Toolkit. The page provides Apt and Yum instructions; for Apt, configure the repository first:
curl -fsSL <https://nvidia.github.io/libnvidia-container/gpgkey> \
| sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -fsSL <https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list> \
| sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' \
| sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
2. Install the packages:
sudo apt-get install -y nvidia-container-toolkit
3. Configure Docker for the NVIDIA driver and restart it:
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
4. Start the container:
docker run -d --gpus=all -v ollama:<ollama data directory shown on the page> -p 11434:11434 --name ollama ollama/ollama
5. Run the example model:
docker exec -it ollama ollama run llama3.2
Check it worked
The page directs you to run a model with docker exec -it ollama ollama run llama3.2 after starting the container. It gives no expected output or separate GPU-usage confirmation.
Limits
NVIDIA Container Toolkit is required; the installation steps above use Apt. On NVIDIA JetPack systems, automatic JetPack version discovery is unavailable: pass JETSON_JETPACK=5 or JETSON_JETPACK=6 to select version 5 or 6. Those are platform versions, not an Ollama release; the page does not name a version for Ollama.
Not for: building llama.cpp with hardware acceleration; see llama-cpp-build-with-hardware-acceleration.
Sources
- Docker, Ollama documentation, read 2026-11-24: "Ollama can't automatically discover the correct JetPack version."
Checked
2026-11-24; read https://docs.ollama.com/docker.md; no command was run.
Started from a post by @Ollama, packaged by the editor. Original post