-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (37 loc) · 1 KB
/
docker-compose.yml
File metadata and controls
38 lines (37 loc) · 1 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
version: '3.8'
services:
cosyvoice-api:
build:
context: .
dockerfile: Dockerfile
container_name: cosyvoice2-api
ports:
- "8012:8012"
volumes:
# Mount model directory (you need to place your models here)
- ./pretrained_models:/app/pretrained_models
# Mount voice cache for persistence
- ./voice_cache:/app/voice_cache
# Mount outputs for generated audio files
- ./outputs:/app/outputs
# Mount logs for debugging
- ./logs:/app/logs
environment:
- PYTHONUNBUFFERED=1
- CUDA_VISIBLE_DEVICES=0
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8012/health"]
interval: 30s
timeout: 30s
retries: 3
start_period: 120s