version: "3.8" services: ollama: image: ollama/ollama ports: - "11434:11434" volumes: - ollama_data:/root/.ollama deploy: resources: reservations: devices: - capabilities: [gpu] volumes: ollama_data: