services: ollama: image: ollama/ollama container_name: ollama restart: unless-stopped init: true tty: true ports: - 11434:11434 volumes: - ollama:/root/.ollama # GPU support deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: [gpu] open-webui: image: ghcr.io/open-webui/open-webui:main container_name: open-webui restart: unless-stopped init: true volumes: - open-webui:/app/backend/data depends_on: - ollama ports: - 8080:8080 environment: - 'OLLAMA_BASE_URL=http://ollama:11434' - 'WEBUI_SECRET_KEY=' extra_hosts: - host.docker.internal:host-gateway volumes: ollama: {} open-webui: {}