Menu

Ollama Docker Setup: GPU, Volumes and Compose
📰

Ollama Docker Setup: GPU, Volumes and Compose

DEV Community: docker·Amaresh Pelleti·14 days ago
#Uc4GhSQU
#devtodocker#devto#dev#ollama#docker
Reading 0:00
15s threshold

--- title : " Ollama Docker Setup: GPU, Volumes and Compose" published : true description : " Ollama Docker setup tested on Docker 29.4.3 and Ollama 0.40.13: persistent volumes, GPU flags for NVIDIA and AMD, a Compose file and the gotchas." tags : ollama, docker, devops, ai canonical_url : https://devtoolhub.com/ollama-docker-setup-gpu-volumes/ --- > Originally published on [DevToolHub](https://devtoolhub.com/ollama-docker-setup-gpu-volumes/).

Running Ollama in a container takes one `docker run` command. That command also decides two things the docs bury: whether your models survive a rebuild, and whether your GPU gets used. This Ollama Docker setup guide covers both. I ran it on Docker 29.4.3 with Ollama 0.40.13 and hit three problems the one-liner doesn't warn you about.

## What Is the Minimum Ollama Docker Setup?

The minimum Ollama Docker setup is one container with a named volume and port 11434 published.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.