commit a8a3780904684d492210d5d878170d167db3a759 Author: Carsten Kvist Date: Sun Feb 22 14:35:18 2026 +0000 Initial Ollama docker compose diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..bfce0b5 --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +OLLAMA_DATA_DIR=/datadisk/docker/ollama +OLLAMA_PORT=11434 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7f7757b --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.env +secrets/ +*.log diff --git a/README.md b/README.md new file mode 100644 index 0000000..426b59a --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# ollama-compose + +## Start +cp .env.example .env +docker compose up -d diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..cd6edbc --- /dev/null +++ b/compose.yml @@ -0,0 +1,14 @@ +services: + ollama: + image: ollama/ollama:latest + container_name: ollama + restart: unless-stopped + + # NVIDIA via Docker Compose v2 + gpus: all + + ports: + - "${OLLAMA_PORT:-11434}:11434" + + volumes: + - "${OLLAMA_DATA_DIR:-/datadisk/docker/ollama}:/root/.ollama"