forked from hwdsl2/self-hosted-ai-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.cuda.yml
More file actions
212 lines (202 loc) · 6.01 KB
/
Copy pathdocker-compose.cuda.yml
File metadata and controls
212 lines (202 loc) · 6.01 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
services:
ollama:
image: hwdsl2/ollama-server:cuda
container_name: ollama
restart: always
# ports:
# - "11434:11434/tcp" # Uncomment for direct access to Ollama
volumes:
- ollama-data:/var/lib/ollama
- ollama-shared:/var/lib/ollama-shared
# - ./ollama.env:/ollama.env:ro # optional: custom config
healthcheck:
test: ["CMD", "curl", "-sf", "http://127.0.0.1:11434/"]
interval: 5s
timeout: 3s
start_period: 60s
retries: 3
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
db:
image: postgres:18
container_name: litellm-db
restart: always
environment:
POSTGRES_USER: litellm
POSTGRES_PASSWORD: litellm
POSTGRES_DB: litellm
volumes:
- litellm-db:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U litellm"]
interval: 5s
timeout: 5s
retries: 5
litellm:
image: hwdsl2/litellm-server
container_name: litellm
restart: always
ports:
- "4000:4000/tcp"
environment:
- LITELLM_OLLAMA_BASE_URL=http://ollama:11434
- LITELLM_MCP_URL=http://mcp:3000/mcp
- LITELLM_DATABASE_URL=postgresql://litellm:litellm@db:5432/litellm
volumes:
- litellm-data:/etc/litellm
- ollama-shared:/var/lib/ollama-shared:ro
- mcp-shared:/var/lib/mcp-shared:ro
- litellm-shared:/var/lib/litellm-shared
# - ./litellm.env:/litellm.env:ro # optional: custom config
depends_on:
ollama:
condition: service_healthy
mcp:
condition: service_healthy
db:
condition: service_healthy
embeddings:
image: hwdsl2/embeddings-server
container_name: embeddings
restart: always
ports:
- "127.0.0.1:8000:8000/tcp"
volumes:
- embeddings-data:/var/lib/embeddings
# - ./embed.env:/embed.env:ro # optional: custom config
whisper:
image: hwdsl2/whisper-server:cuda
container_name: whisper
restart: always
ports:
- "127.0.0.1:9000:9000/tcp"
volumes:
- whisper-data:/var/lib/whisper
# - ./whisper.env:/whisper.env:ro # optional: custom config
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
mcp:
image: hwdsl2/mcp-gateway
container_name: mcp
restart: always
# ports:
# - "3000:3000/tcp" # Uncomment for direct MCP client access (e.g. Claude Desktop, Cursor)
volumes:
- mcp-data:/var/lib/mcp
- mcp-shared:/var/lib/mcp-shared
# - ./mcp.env:/mcp.env:ro # optional: custom config
healthcheck:
test: ["CMD", "curl", "-sf", "http://127.0.0.1:3000/health"]
interval: 5s
timeout: 3s
start_period: 60s
retries: 3
anythingllm:
image: mintplexlabs/anythingllm
container_name: anythingllm
restart: always
ports:
- "3001:3001/tcp" # For a host-based reverse proxy, change to "127.0.0.1:3001:3001/tcp"
environment:
- STORAGE_DIR=/app/server/storage
- LLM_PROVIDER=generic-openai
- GENERIC_OPEN_AI_BASE_PATH=http://litellm:4000/v1
- GENERIC_OPEN_AI_MODEL_PREF=ollama/llama3.2:3b
- GENERIC_OPEN_AI_MODEL_TOKEN_LIMIT=131072
- EMBEDDING_ENGINE=native
- DISABLE_TELEMETRY=true
volumes:
- anythingllm-data:/app/server/storage
- litellm-shared:/var/lib/litellm-shared:ro
- ./chat-ui-bootstrap.sh:/usr/local/bin/chat-ui-bootstrap.sh:ro
entrypoint: ["/bin/bash", "/usr/local/bin/chat-ui-bootstrap.sh"]
# cap_add:
# - SYS_ADMIN # Uncomment if you need AnythingLLM's built-in web scraping (uses Chromium)
depends_on:
- litellm
# docling: # Uncomment to enable document parsing (PDF, DOCX, etc.); also uncomment docling-data volume below
# image: hwdsl2/docling-server:cuda
# container_name: docling
# restart: always
# ports:
# - "127.0.0.1:5001:5001/tcp"
# volumes:
# - docling-data:/var/lib/docling
# # - ./docling.env:/docling.env:ro # optional: custom config
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
# kokoro: # Uncomment to enable text-to-speech (TTS); also uncomment kokoro-data volume below
# image: hwdsl2/kokoro-server:cuda
# container_name: kokoro
# restart: always
# ports:
# - "127.0.0.1:8880:8880/tcp"
# volumes:
# - kokoro-data:/var/lib/kokoro
# # - ./kokoro.env:/kokoro.env:ro # optional: custom config
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
# whisper-live: # Uncomment to enable real-time speech-to-text (WebSocket); also uncomment whisper-live-data volume below
# image: hwdsl2/whisper-live-server:cuda
# container_name: whisper-live
# restart: always
# ports:
# - "127.0.0.1:9090:9090/tcp" # WebSocket
# - "127.0.0.1:8001:8000/tcp" # REST API (host port 8001 avoids conflict with embeddings)
# volumes:
# - whisper-live-data:/var/lib/whisper-live
# # - ./whisper-live.env:/whisper-live.env:ro # optional: custom config
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
volumes:
ollama-data:
name: ollama-data
ollama-shared:
name: ollama-shared
litellm-data:
name: litellm-data
embeddings-data:
name: embeddings-data
whisper-data:
name: whisper-data
mcp-data:
name: mcp-data
mcp-shared:
name: mcp-shared
litellm-shared:
name: litellm-shared
anythingllm-data:
name: anythingllm-data
litellm-db:
name: litellm-db
# docling-data:
# name: docling-data
# kokoro-data:
# name: kokoro-data
# whisper-live-data:
# name: whisper-live-data