services: ollama: image: ollama/ollama:latest container_name: ollama restart: unless-stopped ports: - "11434:11434" environment: - OLLAMA_HOST=0.0.0.0 - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,utility - OLLAMA_CONTEXT_LENGTH=8192 volumes: - ollama_data:/root/.ollama deploy: resources: reservations: devices: - capabilities: [gpu] runtime: nvidia ollama-exporter: image: ghcr.io/mikeh-22/ollama-exporter:latest container_name: ollama-exporter restart: unless-stopped runtime: nvidia environment: - NVIDIA_VISIBLE_DEVICES=all - OLLAMA_URL=http://ollama:11434 ports: - "9101:9101" volumes: - /sys:/sys:ro - /var/run/docker.sock:/var/run/docker.sock depends_on: - ollama openwebui: image: ghcr.io/open-webui/open-webui:main container_name: openwebui restart: unless-stopped ports: - "3000:8080" environment: - OLLAMA_API_BASE=http://ollama:11434 volumes: - openwebui_data:/app/backend/data depends_on: - ollama volumes: ollama_data: openwebui_data: