From a3333d344c8cb0a40e1b8452ff8b87ae6faf1bb6 Mon Sep 17 00:00:00 2001 From: Nick Yeoman Date: Sat, 20 Jun 2026 19:32:28 +0000 Subject: [PATCH] ollama tweaks --- ollama/compose-gpu.yaml | 14 +++++++++----- ollama/sample.env | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ollama/compose-gpu.yaml b/ollama/compose-gpu.yaml index 3a937c9..ee017c9 100644 --- a/ollama/compose-gpu.yaml +++ b/ollama/compose-gpu.yaml @@ -1,15 +1,19 @@ # Ollama GPU services: ollama: - image: ollama/ollama + image: ${OLLAMA_IMAGE:-ollama/ollama} volumes: - ${VOL_PATH}/ollama:/root/.ollama - runtime: nvidia - environment: - - NVIDIA_VISIBLE_DEVICES=all - - NVIDIA_DRIVER_CAPABILITIES=compute,utility + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] ports: - "11434:11434" + restart: unless-stopped webui: image: ${WEBUI_IMAGE:-ghcr.io/open-webui/open-webui:main} diff --git a/ollama/sample.env b/ollama/sample.env index bd8cf20..6fd9272 100644 --- a/ollama/sample.env +++ b/ollama/sample.env @@ -3,3 +3,4 @@ WEBUI_IMAGE=ghcr.io/open-webui/open-webui:main WEBUI_PORT=8080 WEBUI_SECRET_KEY=a2dddd88c9da5f25786a0eb6e48e66305ee999d2adac8f8af821f82f11f56441 # ChangeMe openssl rand -hex 32 WEBUI_URL=ollama.lan +OLLAMA_IMAGE=ollama/ollama:latest \ No newline at end of file