Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
41 changes: 40 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.8"

services:

webui:
Expand All @@ -8,13 +8,42 @@ services:
ports:
- 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
volumes:
- open-webui:/app/backend/data
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
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
Expand All @@ -37,13 +66,23 @@ services:

tunnel:
image: cloudflare/cloudflared:latest
pull_policy: always
restart: unless-stopped
expose:
- 20241/tcp
environment:
- TUNNEL_URL=http://webui:8080
- TUNNEL_METRICS=0.0.0.0:20241
command: tunnel --no-autoupdate
depends_on:
- webui
healthcheck:
test: [ "CMD", "cloudflared", "tunnel", "ready" ]
interval: 30s
timeout: 10s
retries: 3

volumes:
ollama:
open-webui:
chroma-data: