-
Notifications
You must be signed in to change notification settings - Fork 413
/
compose.yaml
203 lines (194 loc) · 5.37 KB
/
compose.yaml
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
version: "3"
services:
tts:
container_name: streamer-sales-tts-server
build:
context: ./
dockerfile: ./docker/Dockerfile
image: streamer-sales:v0.9.0
volumes:
- ./weights:/workspace/Streamer-Sales/weights
- ./work_dirs:/workspace/Streamer-Sales/work_dirs
- ./static:/workspace/Streamer-Sales/static
ports:
- "8001:8001"
networks:
- streamer-sales-network
environment:
USING_DOCKER_COMPOSE: "true"
HF_ENDPOINT: "https://hf-mirror.com"
LANG: "en_US.UTF-8"
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: [ '0' ]
capabilities: [ gpu ]
command:
- /bin/bash
- -c
- |
nvidia-smi
uvicorn server.tts.tts_server:app --host 0.0.0.0 --port 8001
restart: always
digital_human:
container_name: streamer-sales-digital-human-server
build:
context: ./
dockerfile: ./docker/Dockerfile
image: streamer-sales:v0.9.0
volumes:
- ./weights:/workspace/Streamer-Sales/weights
- ./work_dirs:/workspace/Streamer-Sales/work_dirs
- ./static:/workspace/Streamer-Sales/static
ports:
- "8002:8002"
networks:
- streamer-sales-network
environment:
USING_DOCKER_COMPOSE: "true"
HF_ENDPOINT: "https://hf-mirror.com"
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: [ '0' ]
capabilities: [ gpu ]
command:
- /bin/bash
- -c
- |
nvidia-smi
uvicorn server.digital_human.digital_human_server:app --host 0.0.0.0 --port 8002
restart: always
asr:
container_name: streamer-sales-asr-server
build:
context: ./
dockerfile: ./docker/Dockerfile
image: streamer-sales:v0.9.0
volumes:
- ./weights:/workspace/Streamer-Sales/weights
- ./work_dirs:/workspace/Streamer-Sales/work_dirs
- ./static:/workspace/Streamer-Sales/static
ports:
- "8003:8003"
networks:
- streamer-sales-network
environment:
USING_DOCKER_COMPOSE: "true"
HF_ENDPOINT: "https://hf-mirror.com"
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: [ '0' ]
capabilities: [ gpu ]
command:
- /bin/bash
- -c
- |
nvidia-smi
uvicorn server.asr.asr_server:app --host 0.0.0.0 --port 8003
restart: always
llm:
container_name: streamer-sales-llm-server
build:
context: ./
dockerfile: ./docker/Dockerfile
image: streamer-sales:v0.9.0
volumes:
- ./weights:/workspace/Streamer-Sales/weights
- ./work_dirs:/workspace/Streamer-Sales/work_dirs
- ./static:/workspace/Streamer-Sales/static
ports:
- "23333:23333"
networks:
- streamer-sales-network
environment:
USING_DOCKER_COMPOSE: "true"
LMDEPLOY_USE_MODELSCOPE: "True"
MODELSCOPE_CACHE: "./weights/llm_weights"
HF_ENDPOINT: "https://hf-mirror.com"
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: [ '0' ]
capabilities: [ gpu ]
command:
- /bin/bash
- -c
- |
nvidia-smi
lmdeploy serve api_server HinGwenWoong/streamer-sales-lelemiao-7b \
--server-port 23333 \
--model-name internlm2 \
--session-len 32768 \
--cache-max-entry-count 0.1 \
--model-format hf
restart: always
database:
container_name: streamer-sales-database
image: postgres:16.4
ports:
- "5432:5432"
networks:
- streamer-sales-network
environment:
POSTGRES_PASSWORD: "123456"
POSTGRES_DB: "streamer_sales_db"
volumes:
- ./work_dirs/database:/var/lib/postgresql/data # 数据持久化
restart: always
base:
container_name: streamer-sales-base-server
build:
context: ./
dockerfile: ./docker/Dockerfile
image: streamer-sales:v0.9.0
volumes:
- ./weights:/workspace/Streamer-Sales/weights
- ./work_dirs:/workspace/Streamer-Sales/work_dirs
- ./static:/workspace/Streamer-Sales/static
ports:
- "8000:8000"
networks:
- streamer-sales-network
depends_on:
- database
- llm
- tts
- digital_human
- asr
environment:
USING_DOCKER_COMPOSE: "true"
HF_ENDPOINT: "https://hf-mirror.com"
# 数据库配置
POSTGRES_SERVER: "database" # 不可修改,docker-compsoe 路由自动配置的 host
POSTGRES_PASSWORD: "123456" # 和 database.environment.POSTGRES_PASSWORD 一致
POSTGRES_DATABASE: "streamer_sales_db" # 和 database.environment.POSTGRES_DB 一致
# Agent Key (如果没有请忽略)
# DELIVERY_TIME_API_KEY: "${快递 EBusinessID},${快递 api_key}"
# WEATHER_API_KEY: "${天气 API key}"
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: [ '0' ]
capabilities: [ gpu ]
command:
- /bin/bash
- -c
- |
nvidia-smi
sleep 60
uvicorn server.base.base_server:app --host 0.0.0.0 --port 8000
restart: always
networks:
streamer-sales-network: