From 9ea2781562cf4809870decd30e057ead12f3241e Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Thu, 4 Apr 2024 10:16:41 -0400 Subject: [PATCH] share the network stack between open-webui and ollama --- docker-compose.amd.yml | 3 +-- docker-compose.base.yml | 3 ++- docker-compose.cpu.yml | 3 +-- docker-compose.nvidia.yml | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/docker-compose.amd.yml b/docker-compose.amd.yml index 8ca5938..6279c97 100644 --- a/docker-compose.amd.yml +++ b/docker-compose.amd.yml @@ -8,8 +8,7 @@ services: restart: unless-stopped entrypoint: /bootstrap.sh command: mistral - ports: - - 11434:11434 + network_mode: service:open-webui # begin for AMD GPU support devices: - /dev/kfd diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 6412e73..6b1e9b9 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -18,8 +18,9 @@ services: image: ghcr.io/open-webui/open-webui:main ports: - 8080:8080 + - 11434:11434 environment: - OLLAMA_BASE_URL: http://ollama:11434 + OLLAMA_BASE_URL: http://localhost:11434 extra_hosts: - host.docker.internal:host-gateway volumes: diff --git a/docker-compose.cpu.yml b/docker-compose.cpu.yml index c8727dc..2b68fe2 100644 --- a/docker-compose.cpu.yml +++ b/docker-compose.cpu.yml @@ -8,8 +8,7 @@ services: restart: unless-stopped entrypoint: /bootstrap.sh command: mistral - ports: - - 11434:11434 + network_mode: service:open-webui volumes: - ./ollama/bootstrap.sh:/bootstrap.sh:ro - ./ollama:/root/.ollama \ No newline at end of file diff --git a/docker-compose.nvidia.yml b/docker-compose.nvidia.yml index dca8a31..5c7a18e 100644 --- a/docker-compose.nvidia.yml +++ b/docker-compose.nvidia.yml @@ -8,8 +8,7 @@ services: restart: unless-stopped entrypoint: /bootstrap.sh command: mistral - ports: - - 11434:11434 + network_mode: service:open-webui # begin for NVIDIA GPU support deploy: resources: