Skip to content

Instantly share code, notes, and snippets.

@standaloneSA
Created January 23, 2025 03:11
Show Gist options
  • Save standaloneSA/9202c0f1799035ce8d0a571f8653a506 to your computer and use it in GitHub Desktop.
Save standaloneSA/9202c0f1799035ce8d0a571f8653a506 to your computer and use it in GitHub Desktop.
openwebui / ollama on GPU
services:
ollama:
image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest}
container_name: ollama
volumes:
- /mnt/data/ollama:/root/.ollama
pull_policy: always
tty: true
restart: unless-stopped
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
open-webui:
build:
context: .
args:
OLLAMA_BASE_URL: '/ollama'
dockerfile: Dockerfile
image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main}
container_name: open-webui
volumes:
- /mnt/data/openwebui:/app/backend/data
depends_on:
- ollama
ports:
- ${OPEN_WEBUI_PORT-3000}:8080
environment:
- 'OLLAMA_BASE_URL=http://ollama:11434'
- 'WEBUI_SECRET_KEY='
extra_hosts:
- host.docker.internal:host-gateway
restart: unless-stopped
volumes:
ollama: {}
open-webui: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment