-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
131 lines (121 loc) · 3.27 KB
/
docker-compose.yml
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
version: '3.8'
services:
# Tailscale
ts-open-webui:
image: tailscale/tailscale:latest
container_name: ts-open-webui
hostname: ts-open-webui
environment:
- TS_AUTHKEY=${TS_AUTH_KEY}
- TS_EXTRA_ARGS=--advertise-tags=tag:container
- TS_SERVE_CONFIG=/config/open-webui.json
- TS_STATE_DIR=/var/lib/tailscale
- TS_USERSPACE=false
volumes:
- ./state:/var/lib/tailscale
- ./config:/config
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
- sys_module
restart: unless-stopped
# Ollama
ollama:
image: ollama/ollama:latest
container_name: ollama
restart: unless-stopped
environment:
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
- OLLAMA_KEEP_ALIVE=24h
- ENABLE_IMAGE_GENERATION=True
- COMFYUI_BASE_URL=http://stable-diffusion-webui:7860
network_mode: service:ts-open-webui
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./ollama:/root/.ollama
depends_on:
- ts-open-webui
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
# Open Web UI
open-webui:
image: ghcr.io/open-webui/open-webui:latest
container_name: open-webui
restart: unless-stopped
network_mode: service:ts-open-webui
environment:
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
- 'OLLAMA_BASE_URL=http://localhost:11434'
- ENABLE_RAG_WEB_SEARCH=True
- RAG_WEB_SEARCH_ENGINE=brave
- RAG_WEB_SEARCH_RESULT_COUNT=5
- RAG_WEB_SEARCH_CONCURRENT_REQUESTS=10
- BRAVE_SEARCH_API_KEY=${BRAVE_SEARCH_API_KEY}
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./open-webui:/app/backend/data
depends_on:
- ollama
stable-diffusion-download:
build: ./stable-diffusion-webui-docker/services/download/
image: comfy-download
network_mode: service:ts-open-webui
environment:
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./stable-diffusion-webui-docker/data:/data
stable-diffusion-webui:
build: ./stable-diffusion-webui-docker/services/comfy/
image: comfy-ui
network_mode: service:ts-open-webui
environment:
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
- CLI_ARGS=
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./stable-diffusion-webui-docker/data:/data
- ./stable-diffusion-webui-docker/output:/output
stop_signal: SIGKILL
tty: true
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0']
capabilities: [compute, utility]
restart: unless-stopped
# Pipelines
pipelines:
image: ghcr.io/open-webui/pipelines:main
container_name: pipelines
restart: always
network_mode: service:ts-open-webui
volumes:
- pipelines:/app/pipelines
environment:
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
networks:
internal_network:
driver: bridge
volumes:
state:
ollama:
open-webui:
config:
pipelines: