services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:ollama
    container_name: open-webui
    restart: unless-stopped
    ports:
      - "3000:8080"
    environment:
      OLLAMA_FLASH_ATTENTION: "true"
      OLLAMA_KV_CACHE_TYPE: "q8_0"
      NVIDIA_VISIBLE_DEVICES: "all"
    volumes:
      - ollama:/root/.ollama
      - open-webui:/app/backend/data
    runtime: nvidia

volumes:
  ollama:
    external: true
  open-webui:
    external: true
