forked from Saidakmal02/Uzbek_TTS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
129 lines (107 loc) · 2.63 KB
/
docker-compose.yml
File metadata and controls
129 lines (107 loc) · 2.63 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
# Docker Compose for Uzbek TTS API
# Optimized for Coolify deployment with NVIDIA A40 GPU
version: '3.8'
services:
uzbek-tts:
build:
context: .
dockerfile: Dockerfile
container_name: uzbek-tts-api
restart: unless-stopped
# GPU Configuration for NVIDIA A40
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0'] # Use first GPU (A40)
capabilities: [gpu]
# Environment Variables
environment:
# Application
- APP_NAME=Uzbek TTS API
- APP_VERSION=1.0.0
- DEBUG=false
# Server
- HOST=0.0.0.0
- PORT=8000
- WORKERS=1
# Model Paths
- MODEL_PATH=/app/models/UZ.safetensors
- VOCAB_PATH=/app/config/uz_vocab.txt
- CONFIG_PATH=/app/config/UZTTS_conf.yaml
# GPU Configuration (A40 Optimized)
- DEVICE=cuda
- NUM_WORKERS=6
- ENABLE_TF32=true
- ENABLE_COMPILE=true
- CUDA_VISIBLE_DEVICES=0
# Inference Configuration (Speed/Quality Balance)
- NFE_STEPS=18
- CFG_STRENGTH=1.5
- TARGET_RMS=0.1
- DEFAULT_SPEED=1.0
# Cache Configuration
- CACHE_SIZE=1000
- CACHE_DIR=/app/cache
- ENABLE_CACHE=true
# Queue Configuration
- MAX_QUEUE_SIZE=50
- QUEUE_TIMEOUT=300
# API Limits
- MAX_TEXT_LENGTH=5000
- MAX_AUDIO_DURATION=300
- MAX_BATCH_SIZE=8
# Monitoring
- ENABLE_METRICS=true
- METRICS_PORT=9090
# Logging
- LOG_LEVEL=INFO
- LOG_DIR=/app/logs
# Upload
- UPLOAD_DIR=/app/uploads
- MAX_UPLOAD_SIZE=10485760
# CORS
- CORS_ORIGINS=["*"]
# Ports
ports:
- "8000:8000" # API port
- "9090:9090" # Metrics port (optional)
# Volumes
volumes:
# Models (persistent)
- ./models:/app/models:rw
# Config (read-only)
- ./config:/app/config:ro
# Cache (persistent)
- ./cache:/app/cache:rw
# Logs (persistent)
- ./logs:/app/logs:rw
# Uploads (persistent)
- ./uploads:/app/uploads:rw
# Health Check
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Logging
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Network
networks:
- tts-network
# Networks
networks:
tts-network:
driver: bridge
# Volumes (optional, for named volumes instead of bind mounts)
# volumes:
# models-data:
# cache-data:
# logs-data:
# uploads-data: