Initial Ollama docker compose

This commit is contained in:
2026-02-22 14:35:18 +00:00
commit a8a3780904
4 changed files with 24 additions and 0 deletions

2
.env.example Normal file
View File

@@ -0,0 +1,2 @@
OLLAMA_DATA_DIR=/datadisk/docker/ollama
OLLAMA_PORT=11434

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
.env
secrets/
*.log

5
README.md Normal file
View File

@@ -0,0 +1,5 @@
# ollama-compose
## Start
cp .env.example .env
docker compose up -d

14
compose.yml Normal file
View File

@@ -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"