-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·102 lines (98 loc) · 3.52 KB
/
Copy pathdocker-compose.yml
File metadata and controls
executable file
·102 lines (98 loc) · 3.52 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
services:
api:
build: .
image: whisper-live:latest
profiles: ["api"]
command: >
uvicorn server:app --host 0.0.0.0 --port ${API_PORT:-8000}
--ssl-keyfile certs/key.pem --ssl-certfile certs/cert.pem
ports:
- "${API_PORT:-8000}:${API_PORT:-8000}"
- "${STATUS_PORT:-8001}:${STATUS_PORT:-8001}"
volumes:
- ./models:/app/models:ro
- ./certs:/app/certs:ro
environment:
WHISPER_MODEL: ${WHISPER_MODEL:-models/medical-whisper-large-v3-ct2}
WHISPER_DEVICE: ${WHISPER_DEVICE:-cuda}
WHISPER_COMPUTE: ${WHISPER_COMPUTE:-float16}
WHISPER_DEVICE_INDEX: ${WHISPER_DEVICE_INDEX:-0,1,2}
WHISPER_NUM_WORKERS: ${WHISPER_NUM_WORKERS:-4}
WHISPER_API_TOKEN: ${WHISPER_API_TOKEN:?set WHISPER_API_TOKEN in the environment or a .env file}
WHISPER_STATUS_PORT: ${STATUS_PORT:-8001}
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
restart: unless-stopped
web:
build: .
image: whisper-live:latest
profiles: ["web"]
command: >
uvicorn webserver:app --host 0.0.0.0 --port ${WEB_PORT:-8080}
--ssl-keyfile certs/key.pem --ssl-certfile certs/cert.pem
ports:
- "${WEB_PORT:-8080}:${WEB_PORT:-8080}"
volumes:
- ./certs:/app/certs:ro
environment:
WHISPER_API_TOKEN: ${WHISPER_API_TOKEN:?set WHISPER_API_TOKEN in the environment or a .env file}
restart: unless-stopped
# --- proxy profile: behind the shared nginx-proxy + acme-companion stack -----
# No self-signed cert, no directly published ports — nginx-proxy terminates TLS
# with a real Let's Encrypt cert for PROXY_DOMAIN and forwards plain HTTP over
# proxy-net. Both services share one hostname; nginx-proxy's VIRTUAL_PATH does
# path-based routing so /ws and /load reach api-proxy while everything else
# (the static page) falls through to web-proxy. See README "Running behind
# nginx-proxy" for the caveat this implies for static/index.html's hardcoded
# API_PORT.
api-proxy:
build: .
image: whisper-live:latest
profiles: ["proxy"]
command: uvicorn server:app --host 0.0.0.0 --port 8000
volumes:
- ./models:/app/models:ro
environment:
WHISPER_MODEL: ${WHISPER_MODEL:-models/medical-whisper-large-v3-ct2}
WHISPER_DEVICE: ${WHISPER_DEVICE:-cuda}
WHISPER_COMPUTE: ${WHISPER_COMPUTE:-float16}
WHISPER_DEVICE_INDEX: ${WHISPER_DEVICE_INDEX:-0,1,2}
WHISPER_NUM_WORKERS: ${WHISPER_NUM_WORKERS:-4}
WHISPER_API_TOKEN: ${WHISPER_API_TOKEN:?set WHISPER_API_TOKEN in the environment or a .env file}
VIRTUAL_HOST: ${PROXY_DOMAIN:-}
VIRTUAL_PORT: 8000
VIRTUAL_PATH: /ws,/load
LETSENCRYPT_HOST: ${PROXY_DOMAIN:-}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-}
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
networks:
- proxy-net
restart: unless-stopped
web-proxy:
build: .
image: whisper-live:latest
profiles: ["proxy"]
command: uvicorn webserver:app --host 0.0.0.0 --port 8080
environment:
WHISPER_API_TOKEN: ${WHISPER_API_TOKEN:?set WHISPER_API_TOKEN in the environment or a .env file}
VIRTUAL_HOST: ${PROXY_DOMAIN:-}
VIRTUAL_PORT: 8080
LETSENCRYPT_HOST: ${PROXY_DOMAIN:-}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-}
networks:
- proxy-net
restart: unless-stopped
networks:
proxy-net:
external: true