From 5c2b16c4a93b3b5ab6605edfd01638d4ba86820a Mon Sep 17 00:00:00 2001 From: Code Arranger <80373433+codearranger@users.noreply.github.com> Date: Thu, 3 Oct 2024 00:55:00 -0700 Subject: [PATCH 01/10] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index b434a36..8dff321 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: "3.8" + services: webui: From 95feb6647f2b32574531373a3047f4d21c76d684 Mon Sep 17 00:00:00 2001 From: Code Arranger <80373433+codearranger@users.noreply.github.com> Date: Fri, 31 Jan 2025 11:53:59 -0800 Subject: [PATCH 02/10] added chromadb service for webui --- docker-compose.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 8dff321..3ca1cff 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,7 @@ services: ports: - 8080:8080/tcp environment: + - CHROMA_HTTP_HOST=chromadb - OLLAMA_BASE_URL=http://ollama:11434 # uncomment the following if you are running ollama on the docker host and remove the ollama service below #- OLLAMA_BASE_URL=http://host.docker.internal:11434 @@ -15,6 +16,27 @@ services: - open-webui:/app/backend/data depends_on: - ollama + - chromadb + + chromadb: + image: chromadb/chroma:0.6.3 + volumes: + # Be aware that indexed data are located in "/chroma/chroma/" + # Default configuration for persist_directory in chromadb/config.py + # Read more about deployments: https://docs.trychroma.com/deployment + - chroma-data:/chroma/chroma + command: "--workers 1 --host 0.0.0.0 --port 8000 --proxy-headers --log-config chromadb/log_config.yml --timeout-keep-alive 30" + environment: + - IS_PERSISTENT=TRUE + restart: unless-stopped # possible values are: "no", always", "on-failure", "unless-stopped" + expose: + - 8000/tcp + healthcheck: + # Adjust below to match your container port + test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v1/heartbeat" ] + interval: 30s + timeout: 10s + retries: 3 ollama: image: ollama/ollama @@ -47,3 +69,4 @@ services: volumes: ollama: open-webui: + chroma-data: From f6fd31c236ddf955e587076ddcad16327c7cbde1 Mon Sep 17 00:00:00 2001 From: Code Arranger <80373433+codearranger@users.noreply.github.com> Date: Fri, 31 Jan 2025 12:00:37 -0800 Subject: [PATCH 03/10] added chromadb service to readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a06778c..c61da98 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ This Docker Compose configuration outlines a complete setup for running local AI - **Function**: Serves as the web interface for interacting with the Ollama AI models. - **Customization**: Adjust `OLLAMA_API_BASE_URL` to match the internal network URL of the `ollama` service. If running `ollama` on the docker host, comment out the existing `OLLAMA_API_BASE_URL` and use the provided alternative. +### chromadb +- **Image**: `chromadb/chroma` +- **Function**: Provides vector storage for the AI models, enabling efficient data retrieval and management. + ### ollama (Optional if you are running ollama on the docker host) - **Image**: `ollama/ollama` - **Function**: Acts as the AI model server, with the capability to utilize NVIDIA GPUs for model inference. From 47780278a6f6f89be8991a2efb063e0a7c75c84f Mon Sep 17 00:00:00 2001 From: Code Arranger <80373433+codearranger@users.noreply.github.com> Date: Fri, 31 Jan 2025 12:00:58 -0800 Subject: [PATCH 04/10] use latest chromadb image --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3ca1cff..bac1117 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,7 @@ services: - chromadb chromadb: - image: chromadb/chroma:0.6.3 + image: chromadb/chroma volumes: # Be aware that indexed data are located in "/chroma/chroma/" # Default configuration for persist_directory in chromadb/config.py From 36ffb8f549089488a0ca160d74e0c66ed62d201f Mon Sep 17 00:00:00 2001 From: Code Arranger <80373433+codearranger@users.noreply.github.com> Date: Tue, 20 May 2025 21:54:01 -0700 Subject: [PATCH 05/10] fixed chromadb --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index bac1117..e92d56d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,7 +25,6 @@ services: # Default configuration for persist_directory in chromadb/config.py # Read more about deployments: https://docs.trychroma.com/deployment - chroma-data:/chroma/chroma - command: "--workers 1 --host 0.0.0.0 --port 8000 --proxy-headers --log-config chromadb/log_config.yml --timeout-keep-alive 30" environment: - IS_PERSISTENT=TRUE restart: unless-stopped # possible values are: "no", always", "on-failure", "unless-stopped" From 18034fe058b85de92c3746bfcbe66c8480f9869e Mon Sep 17 00:00:00 2001 From: Code Arranger <80373433+codearranger@users.noreply.github.com> Date: Tue, 10 Jun 2025 21:26:25 -0700 Subject: [PATCH 06/10] use compatible version of chromadb --- docker-compose.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index e92d56d..3455ae7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,8 @@ services: - 8080:8080/tcp environment: - CHROMA_HTTP_HOST=chromadb + - ENABLE_WEB_SEARCH=true + - WEB_SEARCH_ENGINE=duckduckgo - OLLAMA_BASE_URL=http://ollama:11434 # uncomment the following if you are running ollama on the docker host and remove the ollama service below #- OLLAMA_BASE_URL=http://host.docker.internal:11434 @@ -19,12 +21,13 @@ services: - chromadb chromadb: - image: chromadb/chroma + image: chromadb/chroma:0.6.3 volumes: # Be aware that indexed data are located in "/chroma/chroma/" # Default configuration for persist_directory in chromadb/config.py # Read more about deployments: https://docs.trychroma.com/deployment - chroma-data:/chroma/chroma + command: "--workers 1 --host 0.0.0.0 --port 8000 --proxy-headers --log-config chromadb/log_config.yml --timeout-keep-alive 30" environment: - IS_PERSISTENT=TRUE restart: unless-stopped # possible values are: "no", always", "on-failure", "unless-stopped" From 7998494e30bbd17cde8624827e85ec7fe74089c7 Mon Sep 17 00:00:00 2001 From: Code Arranger <80373433+codearranger@users.noreply.github.com> Date: Tue, 10 Jun 2025 21:27:46 -0700 Subject: [PATCH 07/10] enable tunnel metrics --- docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3455ae7..ce95c5d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -61,9 +61,13 @@ services: tunnel: image: cloudflare/cloudflared:latest + pull_policy: always restart: unless-stopped + expose: + - 43337/tcp environment: - TUNNEL_URL=http://webui:8080 + - TUNNEL_METRICS=0.0.0.0:43337 command: tunnel --no-autoupdate depends_on: - webui From 04fc3fd2c714236c7e913fdecc414aaf60e9549a Mon Sep 17 00:00:00 2001 From: Code Arranger <80373433+codearranger@users.noreply.github.com> Date: Tue, 10 Jun 2025 22:24:13 -0700 Subject: [PATCH 08/10] added openwebui health check --- docker-compose.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index ce95c5d..28032ad 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,11 @@ services: depends_on: - ollama - chromadb + healthcheck: + test: [ "CMD", "curl", "-f", "http://localhost:8080/health" ] + interval: 30s + timeout: 10s + retries: 3 chromadb: image: chromadb/chroma:0.6.3 From a1dfc05d3f6d68da7ba750e0dec6f95bf14c3e48 Mon Sep 17 00:00:00 2001 From: Code Arranger <80373433+codearranger@users.noreply.github.com> Date: Tue, 10 Jun 2025 22:34:44 -0700 Subject: [PATCH 09/10] added tunnel health check --- docker-compose.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 28032ad..65fcb14 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -76,6 +76,11 @@ services: command: tunnel --no-autoupdate depends_on: - webui + healthcheck: + test: [ "CMD", "cloudflared", "tunnel", "ready" ] + interval: 30s + timeout: 10s + retries: 3 volumes: ollama: From 8e4de236dd6803fbbec2b0a586c03f3f2d335aa5 Mon Sep 17 00:00:00 2001 From: Code Arranger <80373433+codearranger@users.noreply.github.com> Date: Tue, 10 Jun 2025 22:39:58 -0700 Subject: [PATCH 10/10] tunnel metrics ports to 20241/tcp --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 65fcb14..40465c9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -69,10 +69,10 @@ services: pull_policy: always restart: unless-stopped expose: - - 43337/tcp + - 20241/tcp environment: - TUNNEL_URL=http://webui:8080 - - TUNNEL_METRICS=0.0.0.0:43337 + - TUNNEL_METRICS=0.0.0.0:20241 command: tunnel --no-autoupdate depends_on: - webui