From 733b3a4dec6fc4de72d3287c404306010b488215 Mon Sep 17 00:00:00 2001 From: Fabian Schmidt Date: Mon, 23 Sep 2024 16:23:42 +0200 Subject: [PATCH] Add ollama with open-webui. Change environment when accessible from outside lan --- ollama/compose.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 ollama/compose.yaml diff --git a/ollama/compose.yaml b/ollama/compose.yaml new file mode 100644 index 0000000..59db144 --- /dev/null +++ b/ollama/compose.yaml @@ -0,0 +1,38 @@ +services: + ollama: + image: ollama/ollama:latest + container_name: ollama + ports: + - 11434:11434 + volumes: + - /data/docker/ollama/ollama:/root/.ollama + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + restart: unless-stopped + open-webui: + image: ghcr.io/open-webui/open-webui:cuda + container_name: open-webui + ports: + - 3010:8080 + volumes: + - /data/docker/ollama/open-webui:/app/backend/data + environment: + - 'OLLAMA_BASE_URL=http://ollama:11434' + - 'WEBUI_AUTH=False' + extra_hosts: + - host.docker.internal:host-gateway + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + depends_on: + - ollama + restart: unless-stopped