Skip to content

Commit 4ee729c

Browse files
committedSep 22, 2024
add AI stack
1 parent 9e47851 commit 4ee729c

File tree

1 file changed

+173
-3
lines changed

1 file changed

+173
-3
lines changed
 

‎docker/AI/docker-compose.yml

+173-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
version: "3.8"
2-
31
services:
42
ollama:
53
image: ollama/ollama:0.3.11
64
container_name: ollama
75
restart: unless-stopped
6+
networks:
7+
- ai-stack
88
volumes:
99
- ollama:/root/.ollama
1010
ports:
@@ -21,15 +21,185 @@ services:
2121
image: ghcr.io/open-webui/open-webui:v0.3.23
2222
container_name: open-webui
2323
restart: unless-stopped
24+
networks:
25+
- ai-stack
26+
environment:
27+
- ENABLE_RAG_WEB_SEARCH=True
28+
- RAG_WEB_SEARCH_ENGINE=searxng
29+
- RAG_WEB_SEARCH_RESULT_COUNT=3
30+
- RAG_WEB_SEARCH_CONCURRENT_REQUESTS=10
31+
- SEARXNG_QUERY_URL=http://searxng:8080/search?q=<query>
32+
- OAUTH_CLIENT_ID=${OAUTH_CLIENT_ID}
33+
- OAUTH_CLIENT_SECRET=${OAUTH_CLIENT_SECRET}
34+
- OPENID_PROVIDER_URL=${OPENID_PROVIDER_URL}
35+
- OAUTH_PROVIDER_NAME=${OAUTH_PROVIDER_NAME}
36+
- OAUTH_USERNAME_CLAIM=name
37+
- OAUTH_EMAIL_CLAIM=email
38+
- OAUTH_SCOPES=${OAUTH_SCOPES}
39+
- OAUTH_MERGE_ACCOUNTS_BY_EMAIL=True
40+
- ENABLE_OAUTH_SIGNUP=True
41+
- ENABLE_SIGNUP=True
42+
- WEBUI_AUTH=False
43+
- ENABLE_LOGIN_FORM=True
44+
- ENABLE_IMAGE_GENERATION=True
45+
- COMFYUI_BASE_URL=http://stable-diffusion-webui:7860
2446
ports:
2547
- 3000:8080
2648
volumes:
2749
- open-webui:/app/backend/data
2850
extra_hosts:
2951
- host.docker.internal:host-gateway
3052

53+
searxng:
54+
image: searxng/searxng@sha256:efc99f666dd360bb5f606b401cff5baad6cdbb3095fd061b3eb34e0c1a12e54a
55+
container_name: searxng
56+
networks:
57+
- ai-stack
58+
environment:
59+
- PUID=${PUID:-1000}
60+
- PGID=${PGID:-1000}
61+
volumes:
62+
- /etc/localtime:/etc/localtime:ro
63+
- /etc/timezone:/etc/timezone:ro
64+
- /docker/appdata/searxng:/etc/searxng
65+
depends_on:
66+
- ollama
67+
- open-webui
68+
restart: unless-stopped
69+
ports:
70+
- "8081:8080"
71+
72+
stable-diffusion-download:
73+
build: /docker/appdata/stable-diffusion-webui-docker/services/download/
74+
image: comfy-download
75+
environment:
76+
- PUID=${PUID:-1000}
77+
- PGID=${PGID:-1000}
78+
volumes:
79+
- /etc/localtime:/etc/localtime:ro
80+
- /etc/timezone:/etc/timezone:ro
81+
- /docker/appdata/stable-diffusion-webui-docker/data:/data
82+
83+
stable-diffusion-webui:
84+
build: /docker/appdata/stable-diffusion-webui-docker/services/comfy/
85+
image: comfy-ui
86+
environment:
87+
- PUID=${PUID:-1000}
88+
- PGID=${PGID:-1000}
89+
- CLI_ARGS=
90+
volumes:
91+
- /etc/localtime:/etc/localtime:ro
92+
- /etc/timezone:/etc/timezone:ro
93+
- /docker/appdata/stable-diffusion-webui-docker/data:/data
94+
- /docker/appdata/stable-diffusion-webui-docker/output:/output
95+
stop_signal: SIGKILL
96+
tty: true
97+
deploy:
98+
resources:
99+
reservations:
100+
devices:
101+
- driver: nvidia
102+
device_ids: ['0']
103+
capabilities: [compute, utility]
104+
restart: unless-stopped
105+
networks:
106+
- ai-stack
107+
ports:
108+
- "7860:7860"
109+
110+
mongo:
111+
image: mongo
112+
env_file:
113+
- .env
114+
networks:
115+
- ai-stack
116+
restart: unless-stopped
117+
volumes:
118+
- /etc/localtime:/etc/localtime:ro
119+
- /etc/timezone:/etc/timezone:ro
120+
- /docker/appdata/whisper/db_data:/data/db
121+
- /docker/appdata/whisper/db_data/logs/:/var/log/mongodb/
122+
environment:
123+
- PUID=${PUID:-1000}
124+
- PGID=${PGID:-1000}
125+
- MONGO_INITDB_ROOT_USERNAME=${DB_USER:-whisper}
126+
- MONGO_INITDB_ROOT_PASSWORD=${DB_PASS:-whisper}
127+
command: ['--logpath', '/var/log/mongodb/mongod.log']
128+
ports:
129+
- "27017:27017"
130+
131+
translate:
132+
container_name: whisper-libretranslate
133+
image: libretranslate/libretranslate:v1.6.0-cuda
134+
env_file:
135+
- .env
136+
networks:
137+
- ai-stack
138+
restart: "no"
139+
volumes:
140+
- /etc/localtime:/etc/localtime:ro
141+
- /etc/timezone:/etc/timezone:ro
142+
- /docker/appdata/whisper/libretranslate/data:/home/libretranslate/.local/share
143+
- /docker/appdata/whisper/libretranslate/cache:/home/libretranslate/.local/cache
144+
user: root
145+
tty: true
146+
environment:
147+
- PUID=${PUID:-1000}
148+
- PGID=${PGID:-1000}
149+
- LT_DISABLE_WEB_UI=True
150+
- LT_LOAD_ONLY=${LT_LOAD_ONLY:-en,fr,es}
151+
- LT_UPDATE_MODELS=True
152+
deploy:
153+
resources:
154+
reservations:
155+
devices:
156+
- driver: nvidia
157+
count: all
158+
capabilities: [gpu]
159+
ports:
160+
- "5000:5000"
161+
162+
whisper:
163+
container_name: whisper
164+
pull_policy: always
165+
image: pluja/whishper:v3.1.4-gpu
166+
env_file:
167+
- .env
168+
networks:
169+
- ai-stack
170+
volumes:
171+
- /etc/localtime:/etc/localtime:ro
172+
- /etc/timezone:/etc/timezone:ro
173+
- /docker/appdata/whisper/uploads:/app/uploads
174+
- /docker/appdata/whisper/logs:/var/log/whishper
175+
- /docker/appdata/whisper/models:/app/models
176+
restart: unless-stopped
177+
depends_on:
178+
- mongo
179+
environment:
180+
- PUID=${PUID:-1000}
181+
- PGID=${PGID:-1000}
182+
- PUBLIC_INTERNAL_API_HOST=http://127.0.0.1:80
183+
- PUBLIC_API_HOST=${WHISHPER_HOST:-}
184+
- PUBLIC_WHISHPER_PROFILE=gpu
185+
- WHISPER_MODELS_DIR=/app/models
186+
- UPLOAD_DIR=/app/uploads
187+
deploy:
188+
resources:
189+
reservations:
190+
devices:
191+
- driver: nvidia
192+
count: all
193+
capabilities: [gpu]
194+
ports:
195+
- "8090:80"
196+
197+
networks:
198+
ai-stack:
199+
external: true
200+
31201
volumes:
32202
ollama:
33203
external: true
34204
open-webui:
35-
external: true
205+

0 commit comments

Comments
 (0)
Please sign in to comment.