mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-03 18:36:22 +00:00
29 lines
758 B
YAML
29 lines
758 B
YAML
# Ollama GPU
|
|
services:
|
|
ollama:
|
|
image: ${OLLAMA_IMAGE:-ollama/ollama}
|
|
volumes:
|
|
- ${VOL_PATH}/ollama:/root/.ollama
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities: [gpu]
|
|
ports:
|
|
- "11434:11434"
|
|
restart: unless-stopped
|
|
|
|
webui:
|
|
image: ${WEBUI_IMAGE:-ghcr.io/open-webui/open-webui:main}
|
|
volumes:
|
|
- "${VOL_PATH:-/data}/webui:/root/.cache"
|
|
- "${VOL_PATH:-/data}/open-webui:/app/backend/data"
|
|
environment:
|
|
- WEBUI_URL=${WEBUI_URL:-http://localhost:8080}
|
|
- WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY:?must_be_set}
|
|
- OLLAMA_BASE_URL=http://ollama:11434
|
|
ports:
|
|
- "${WEBUI_PORT:-8080}:8080"
|