mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 10:56:23 +00:00
37 lines
884 B
YAML
37 lines
884 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
ollama:
|
|
image: ollama/ollama
|
|
runtime: nvidia
|
|
environment:
|
|
- NVIDIA_VISIBLE_DEVICES=all
|
|
ports:
|
|
- "11434:11434"
|
|
volumes:
|
|
- ./data/ollama:/root/.ollama
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities: [gpu]
|
|
|
|
webui:
|
|
image: ${WEBUI_IMAGE:-ghcr.io/open-webui/open-webui:cuda}
|
|
runtime: nvidia # Use NVIDIA runtime for GPU support
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- capabilities: [gpu]
|
|
environment:
|
|
- NVIDIA_VISIBLE_DEVICES=all
|
|
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
|
volumes:
|
|
- "${VOL_PATH:-./data}/webui:/root/.cache"
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
ports:
|
|
- "3000:8080" # Open WebUI access |