-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
130 lines (123 loc) · 4.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
130 lines (123 loc) · 4.13 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
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
# See NOTE comments for places to modify.
services:
traefik:
image: traefik:v3.3.1
command:
# Swarm provider configuration
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
# This is set up for HTTP. If you want HTTPS support for production, use Docker Swarm
# (check out swarm-deploy.yml) or ask ChatGPT to modify this file for you.
- "--entrypoints.web.address=:80"
ports:
- "80:80"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
frontend:
image: unmute-frontend:latest
build:
context: frontend/
dockerfile: hot-reloading.Dockerfile
volumes:
- ./frontend/src:/app/src
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=PathPrefix(`/`)"
- "traefik.http.routers.frontend.entrypoints=web"
- "traefik.http.services.frontend.loadbalancer.server.port=3000"
- "traefik.http.routers.frontend.priority=10" # lowest priority
backend:
image: unmute-backend:latest
build:
context: ./
target: hot-reloading
volumes:
- ./unmute:/app/unmute
environment:
- KYUTAI_STT_URL=ws://stt:8080
- KYUTAI_TTS_URL=ws://tts:8080
- KYUTAI_LLM_URL=http://llm:8000
- NEWSAPI_API_KEY=$NEWSAPI_API_KEY
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=PathPrefix(`/api`)"
- "traefik.http.routers.backend.middlewares=strip-api"
- "traefik.http.middlewares.strip-api.replacepathregex.regex=^/api/(.*)"
- "traefik.http.middlewares.strip-api.replacepathregex.replacement=/$$1"
- "traefik.http.routers.backend.entrypoints=web"
- "traefik.http.services.backend.loadbalancer.server.port=80"
- "traefik.http.routers.backend.priority=100" # higher priority than frontend
- "prometheus-port=80"
tts:
image: moshi-server:latest
command: ["worker", "--config", "configs/tts.toml"]
build:
context: services/moshi-server
dockerfile: public.Dockerfile
environment:
- HUGGING_FACE_HUB_TOKEN=$HUGGING_FACE_HUB_TOKEN
volumes:
- ./volumes/hf-cache:/root/.cache/huggingface
- ./volumes/cargo-registry-tts:/root/.cargo/registry
- ./volumes/tts-target:/app/target
- ./volumes/uv-cache:/root/.cache/uv
- /tmp/models/:/models
- ./volumes/tts-logs:/logs
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
stt:
image: moshi-server:latest
command: ["worker", "--config", "configs/stt.toml"]
build:
context: services/moshi-server
dockerfile: public.Dockerfile
environment:
- HUGGING_FACE_HUB_TOKEN=$HUGGING_FACE_HUB_TOKEN
volumes:
- ./volumes/hf-cache:/root/.cache/huggingface
- ./volumes/cargo-registry-stt:/root/.cargo/registry
- ./volumes/stt-target:/app/target
- ./volumes/uv-cache:/root/.cache/uv
- /tmp/models/:/models
- ./volumes/stt-logs:/logs
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
llm:
image: vllm/vllm-openai:v0.9.1
command:
[
# NOTE: Change the LLM here if you want.
# (caution: gemma-3-1b-it also exists but it's slow on vLLM: https://github.com/vllm-project/vllm/issues/19575)
"--model=meta-llama/Llama-3.2-1B-Instruct",
# NOTE: You can adapt this based on your GPU memory.
# A higher value takes more memory but supports longer conversations.
"--max-model-len=1536",
"--dtype=bfloat16",
# NOTE: Change this based on your GPU memory.
# A higher value can make inference faster.
"--gpu-memory-utilization=0.4",
]
volumes:
- ./volumes/hf-cache:/root/.cache/huggingface
- ./volumes/vllm-cache:/root/.cache/vllm
environment:
- HUGGING_FACE_HUB_TOKEN=$HUGGING_FACE_HUB_TOKEN
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
networks:
default: