-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
174 lines (161 loc) · 5.18 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
174 lines (161 loc) · 5.18 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
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
services:
backend:
build:
context: .
dockerfile: Dockerfile
target: production
image: autovoice-backend:${AUTOVOICE_IMAGE_TAG:-local}
restart: unless-stopped
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
- LOG_LEVEL=${LOG_LEVEL:-info}
- SECRET_KEY=${SECRET_KEY:?SECRET_KEY must be set}
- CUDA_VISIBLE_DEVICES=0
- MAX_WORKERS=${MAX_WORKERS:-4}
- DATA_DIR=/app/data
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost:3000,http://localhost:10001}
- AUTOVOICE_PUBLIC_DEPLOYMENT=${AUTOVOICE_PUBLIC_DEPLOYMENT:-false}
- AUTOVOICE_REQUIRE_API_AUTH=${AUTOVOICE_REQUIRE_API_AUTH:-false}
- AUTOVOICE_API_TOKEN=${AUTOVOICE_API_TOKEN:-}
- AUTOVOICE_STRICT_PATH_SANDBOX=${AUTOVOICE_STRICT_PATH_SANDBOX:-true}
- AUTOVOICE_REQUIRE_MEDIA_CONSENT=${AUTOVOICE_REQUIRE_MEDIA_CONSENT:-false}
- RATE_LIMIT=${RATE_LIMIT:-60}
env_file:
- path: .env
required: false
ports:
- "${HOST_PORT:-10001}:5000"
volumes:
- ${AUTOVOICE_PRETRAINED_DIR:-./models/pretrained}:/app/models/pretrained:ro
- autovoice-app-state:/app/data/app_state
- autovoice-profiles:/app/data/voice_profiles
- autovoice-samples:/app/data/samples
- autovoice-trained-models:/app/data/trained_models
- autovoice-checkpoints:/app/data/checkpoints
- autovoice-training-vocals:/app/data/training_vocals
- autovoice-youtube-audio:/app/data/youtube_audio
- autovoice-separated-youtube:/app/data/separated_youtube
- autovoice-diarized-youtube:/app/data/diarized_youtube
- autovoice-uploads:/app/data/uploads
- autovoice-outputs:/app/data/outputs
- autovoice-swarm-runs:/app/data/swarm_runs
- autovoice-swarm-memory:/app/data/swarm_memory
- autovoice-logs:/app/logs
- ./config:/app/config:ro
deploy:
resources:
limits:
memory: 32G
reservations:
memory: 8G
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/ready"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
- autovoice-net
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.frontend
image: autovoice-frontend:${AUTOVOICE_IMAGE_TAG:-local}
restart: unless-stopped
ports:
- "${FRONTEND_PORT:-3000}:80"
depends_on:
backend:
condition: service_healthy
networks:
- autovoice-net
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
prometheus:
image: prom/prometheus:v2.54.1@sha256:69961df6ffa67598048a31aa2822d61f3c93b91d7db24e44d9bb03f99d520da9
restart: unless-stopped
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- "${PROMETHEUS_PORT:-10002}:9090"
volumes:
- ./config/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./config/prometheus/alert_rules.yml:/etc/prometheus/alert_rules.yml:ro
- prometheus-data:/prometheus
networks:
- autovoice-net
profiles:
- monitoring
grafana:
image: grafana/grafana:11.2.0@sha256:37a5d8860aef847dfa09f5f8947f010f6479f98cf7820b5186f9c6314b44be60
restart: unless-stopped
ports:
- "${GRAFANA_PORT:-10003}:3000"
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:?GRAFANA_PASSWORD must be set when monitoring profile is enabled}
- GF_INSTALL_PLUGINS=grafana-piechart-panel
volumes:
- grafana-data:/var/lib/grafana
- ./config/grafana/dashboards:/etc/grafana/provisioning/dashboards:ro
- ./config/grafana/datasources:/etc/grafana/provisioning/datasources:ro
networks:
- autovoice-net
profiles:
- monitoring
depends_on:
- prometheus
volumes:
autovoice-app-state:
name: autovoice-app-state
autovoice-profiles:
name: autovoice-profiles
autovoice-samples:
name: autovoice-samples
autovoice-trained-models:
name: autovoice-trained-models
autovoice-checkpoints:
name: autovoice-checkpoints
autovoice-training-vocals:
name: autovoice-training-vocals
autovoice-youtube-audio:
name: autovoice-youtube-audio
autovoice-separated-youtube:
name: autovoice-separated-youtube
autovoice-diarized-youtube:
name: autovoice-diarized-youtube
autovoice-uploads:
name: autovoice-uploads
autovoice-outputs:
name: autovoice-outputs
autovoice-swarm-runs:
name: autovoice-swarm-runs
autovoice-swarm-memory:
name: autovoice-swarm-memory
autovoice-logs:
name: autovoice-logs
prometheus-data:
name: autovoice-prometheus-data
grafana-data:
name: autovoice-grafana-data
networks:
autovoice-net:
name: autovoice-net
driver: bridge