-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
125 lines (111 loc) · 2.46 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
x-base: &x-base
init: true
environment:
- LOG_LEVEL=INFO
volumes:
- ./diffusert:/workspace/diffusert/
- ~/.cache/huggingface:/root/.cache/huggingface
working_dir: /workspace/diffusert
x-gpu: &x-gpu
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: ["gpu"]
services:
whisper:
<<: *x-gpu
image: onerahmet/openai-whisper-asr-webservice:latest-gpu
environment:
- ASR_MODEL=small
profiles:
- speech
promptgen: &promptgen
<<: [*x-base,*x-gpu]
image: videosd-backend
expose:
- 8000
entrypoint: "uvicorn promptgen:app --host 0.0.0.0"
volumes:
- ./llms:/models
- ./diffusert:/workspace/diffusert/
- ~/.cache/huggingface:/root/.cache/huggingface
profiles:
- production
promptgen-dev:
<<: *promptgen
image: videosd-backend
entrypoint: "sleep infinity"
profiles:
- ''
- dev
certbot:
image: certbot/certbot:latest
profiles:
- letsencrypt
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw
frontend-build:
image: node:21-alpine
working_dir: /app
volumes:
- ./client:/app
command:
- /bin/sh
- -c
- |
npm install
npm run build
profiles:
- build
frontend: &frontend
image: nginx
volumes:
- ./client/out/:/usr/share/nginx/html
- ./configs/nginx.conf:/etc/nginx/templates/default.conf.template
- ./certbot/www/:/var/www/certbot/:ro
- ./certbot/conf/:/etc/letsencrypt/:ro
ports:
- 80:80
- 443:443
environment:
- BACKEND_HOST=backend
- PROMPTGEN_HOST=promptgen
profiles:
- production
frontend-dev:
<<: *frontend
environment:
- BACKEND_HOST=backend-dev
- PROMPTGEN_HOST=promptgen-dev
profiles:
- ''
- dev
backend: &backend
<<: [*x-base,*x-gpu]
build: .
entrypoint: "python3 server.py"
shm_size: 50g
expose:
- 8080
profiles:
- production
backend-dev:
<<: *backend
image: videosd-backend
entrypoint: "sleep infinity"
profiles:
- ''
- dev
coturn:
image: coturn/coturn
network_mode: host
volumes:
- ./configs/turnserver.conf:/etc/coturn/turnserver.conf
environment:
- DETECT_EXTERNAL_IP=no
- DETECT_RELAY_IP=no
- DETECT_EXTERNAL_IPV6=no
- DETECT_RELAY_IPV6=no