Add ollama/docker-compose.yml

This commit is contained in:
2026-01-31 19:14:29 +00:00
parent b721e0108c
commit edf45229dc
+33
View File
@@ -0,0 +1,33 @@
services:
ollama:
container_name: ollama
image: ollama/ollama:latest
restart: unless-stopped
ports:
- 11434:11434
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
volumes:
- /srv/ollama:/root/.ollama
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
# Optional: Web UI for Ollama
open-webui:
container_name: open-webui
image: ghcr.io/open-webui/open-webui:main
restart: unless-stopped
ports:
- 3000:8080
environment:
- OLLAMA_BASE_URL=http://ollama:11434
volumes:
- /srv/open-webui:/app/backend/data
depends_on:
- ollama