-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (105 loc) · 2.71 KB
/
Copy pathdocker-compose.yml
File metadata and controls
112 lines (105 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
services:
litellm:
image: ghcr.io/berriai/litellm:main-latest
restart: unless-stopped
ports:
- "4000:4000"
env_file: .env
volumes:
- ./config/litellm_config.yaml:/app/litellm_config.yaml
command: [ "--config", "/app/litellm_config.yaml" ]
depends_on:
- db
chroma:
image: chromadb/chroma
restart: unless-stopped
ports:
- "8000:8000"
volumes:
- chroma_data:/chroma/chroma
db:
image: postgres:13
restart: unless-stopped
environment:
POSTGRES_USER: llmuser
POSTGRES_PASSWORD: llmpassword
POSTGRES_DB: litellm
volumes:
- pg_data:/var/lib/postgresql/data
ollama:
image: ollama/ollama:latest
restart: unless-stopped
ports:
- "11434:11434"
environment:
- NVIDIA_VISIBLE_DEVICES=all
- OLLAMA_KEEP_ALIVE=5m
volumes:
- ollama_data:/root/.ollama
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [ gpu ]
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:11434/api/tags || exit 1"]
interval: 10s
timeout: 5s
retries: 20
start_period: 30s
profiles:
- local # Only starts with: docker compose --profile local up -d
ollama-init:
image: curlimages/curl:latest
restart: "no"
entrypoint: ["curl", "-sf", "-X", "POST",
"http://ollama:11434/api/pull",
"-H", "Content-Type: application/json",
"-d", "{\"name\":\"qwen3.5:9b\",\"stream\":false}",
"--max-time", "0"]
depends_on:
ollama:
condition: service_healthy
profiles:
- local
web:
image: nginx:alpine
restart: unless-stopped
ports:
- "8080:80"
volumes:
- ./web:/usr/share/nginx/html:ro
depends_on:
- trinity-agent
trinity-agent:
build: ./agent
restart: unless-stopped
ports:
- "8001:8001"
- "8090:8090" # web_builder preview server
env_file: .env
environment:
- LITELLM_API_BASE=http://litellm:4000
- OLLAMA_API_BASE=http://ollama:11434
- CHROMA_HOST=chroma
- CHROMA_PORT=8000
- LITELLM_MASTER_KEY=sk-1234567890
- PYTHONUNBUFFERED=1
volumes:
- "./memory:/app/memory:rw"
- "./agent/skills/dynamic:/app/skills/dynamic:rw"
- "./.env:/app/.env"
- "./agent/prompts:/app/prompts:ro"
- "./config/litellm_config.yaml:/app/litellm_config.yaml"
- "./agent/app.py:/app/app.py:ro"
- "./agent/skills/core:/app/skills/core:ro"
- "./identity.md:/app/identity.md:ro"
depends_on:
- litellm
- chroma
volumes:
chroma_data:
pg_data:
ollama_data: