networks:
  1panel-network:
    external: true

services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:v0.8.5
    container_name: ${CONTAINER_NAME}
    labels:
      createdBy: "Apps"
    restart: always
    networks:
      - 1panel-network
    devices:
      - /dev/dri:/dev/dri
      # - /dev/kfd:/dev/kfd
      # - /dev/nvidia0:/dev/nvidia0
      # - /dev/nvidiactl:/dev/nvidiactl
      # - /dev/nvidia-modeset:/dev/nvidia-modeset
      # - /dev/nvidia-nvswitchctl:/dev/nvidia-nvswitchctl
      # - /dev/nvidia-uvm:/dev/nvidia-uvm
      # - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools
      # - /dev/video11:/dev/video11
    ports:
      - ${PANEL_APP_PORT_HTTP}:8080
    volumes:
      - ${OPEN_WEBUI_ROOT_PATH}/data:/app/backend/data
    environment:
      - TZ=Asia/Shanghai
      - PORT=8080
      - ENABLE_OLLAMA_API=True
      - ENABLE_OPENAI_API=False
      - https_proxy=${http_proxy}
