[mod] gpu

This commit is contained in:
Andy Bunce 2025-01-20 20:52:18 +00:00
parent 0a039d0ac7
commit 08060f357b

View file

@ -8,7 +8,16 @@ services:
restart: unless-stopped restart: unless-stopped
image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest} image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest}
ports: ports:
- 11434:11434 - 11434:11434
devices:
- /dev/dri:/dev/dri
deploy:
resources:
reservations:
devices:
- capabilities: ["gpu"]
count: all
open-webui: open-webui:
build: build:
@ -27,10 +36,12 @@ services:
environment: environment:
- 'OLLAMA_BASE_URL=http://ollama:11434' - 'OLLAMA_BASE_URL=http://ollama:11434'
- 'WEBUI_SECRET_KEY=' - 'WEBUI_SECRET_KEY='
devices:
- /dev/dri:/dev/dri
extra_hosts: extra_hosts:
- host.docker.internal:host-gateway - host.docker.internal:host-gateway
restart: unless-stopped restart: unless-stopped
volumes: volumes:
ollama: {} ollama: {}
open-webui: {} open-webui: {}