-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
118 lines (108 loc) · 3.35 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
services:
# ================================ Whisper-CUDA ================================
# - using separate server for each GPU for better compatibility with different GPUs
.faster-whisper-server-cuda:
image: fedirz/faster-whisper-server:latest-cuda
restart: unless-stopped
profiles: ["NEVER"]
volumes:
- hugging_face_cache:/root/.cache/huggingface
# environment:
# # https://github.com/fedirz/faster-whisper-server/blob/master/src/faster_whisper_server/config.py
# # Set to [0,1] if you want to use two GPU, [0,1,2] for three, etc.
# # Trying to load Whisper twice on one gpu with [0,0] slows it down! Don't do it.
# # Works only if all GPUs have the same compute capabilities!
# - WHISPER__DEVICE_INDEX=[0]
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: []
#count: all
capabilities: [gpu]
faster-whisper-server-cuda:
extends: .faster-whisper-server-cuda
profiles: ["cuda", "cuda2x"]
ports:
- 8000:8000
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0']
capabilities: [gpu]
faster-whisper-server-cuda2x:
extends: .faster-whisper-server-cuda
profiles: ["cuda2x"]
ports:
- 8001:8000
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['1']
capabilities: [gpu]
# ================================ Whisper-CPU ================================
faster-whisper-server-cpu:
image: fedirz/faster-whisper-server:latest-cpu
restart: unless-stopped
profiles: ["cpu"]
ports:
- 8000:8000
volumes:
- hugging_face_cache:/root/.cache/huggingface
# ================================ Pyannote-CUDA ================================
# - one server should be enough for all GPUs
pyannote-server-cuda:
image: local/pyannote-server:latest-cuda
build:
context: .
dockerfile: .docker-pyannote-server/Dockerfile
pull_policy: never
restart: unless-stopped
profiles: ["cuda", "cuda2x"]
ports:
- 8010:8000
volumes:
- hugging_face_cache:/root/.cache/huggingface
environment:
# `1` uses like 75% of RTX 3090 max performance, so at most `2` makes sense.
# `2` was 14% faster when testing with two identical concurrent requests.
- GPU_PARALLEL_COUNTS=1
- CPU_DEVICES=0
#- CPU_PARALLEL_COUNTS=1
#- AUDIO_SEMAPHORE=12
#- DIARIZATION_SEMAPHORE=16
deploy:
resources:
reservations:
devices:
- driver: nvidia
#device_ids: ['0']
count: all
capabilities: [gpu]
# ================================ Pyannote-CPU ================================
pyannote-server-cpu:
image: local/pyannote-server:latest-cpu
build:
context: .
dockerfile: .docker-pyannote-server/Dockerfile
args:
- TORCH_CPU=1
pull_policy: never
restart: unless-stopped
profiles: ["cpu"]
ports:
- 8010:8000
volumes:
- hugging_face_cache:/root/.cache/huggingface
environment:
- CPU_DEVICES=1
- CPU_PARALLEL_COUNTS=1
- AUDIO_SEMAPHORE=1
- DIARIZATION_SEMAPHORE=1
volumes:
hugging_face_cache: