networks: tts: driver: bridge ipam: driver: default config: - subnet: "10.10.11.0/24" gateway: "10.10.11.1" services: haproxy: image: docker.io/library/haproxy:3.0.11 # previously 3.3-dev volumes: - ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro depends_on: - tts - api - blips - radio - radio-gibberish - tts-dashboard ports: - 5011:5002 - 8889:8888 networks: - tts api: build: context: . network: host command: python -u tts-api.py networks: - tts volumes: - ./cache:/workspace/cache:rw environment: # only enable this if you're having gpu errors you need to debug. #- TORCH_USE_CUDA_DSA=1 - TORCH_CUDNN_SDPA_ENABLED=1 - TORCH_LOG=perf_hints devices: - nvidia.com/gpu=all healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5002/health-check"] interval: 30s timeout: 10s retries: 3 start_period: 40s deploy: mode: replicated replicas: 5 restart_policy: condition: on-failure delay: 5s max_attempts: 3 window: 120s tts: build: context: . network: host command: python -u tg_tts_service.py networks: - tts volumes: - ./speaker_latents:/workspace/speaker_latents:rw - ./voice_mapping.json:/workspace/voice_mapping.json:rw - ./huggingfacecache:/root/.cache/huggingface:rw - ${PWD}/db:/workspace/db environment: - TORCH_USE_CUDA_DSA=1 - TORCH_CUDNN_SDPA_ENABLED=1 - TORCH_LOG=perf_hints - DB_PATH=/workspace/db/tts_stats.db devices: - nvidia.com/gpu=all healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5003/health-check"] interval: 30s timeout: 10s retries: 3 start_period: 40s deploy: mode: replicated replicas: 1 restart_policy: condition: on-failure delay: 5s max_attempts: 3 window: 120s tts-dashboard: build: . command: python -u tts_dashboard.py networks: - default volumes: - ${PWD}/db:/workspace/db environment: - DB_PATH=/workspace/db/tts_stats.db ports: - 5007:5007 blips: build: context: . network: host command: python -u tg_tts_service_blips_new.py networks: - tts volumes: - ./speaker_latents:/workspace/speaker_latents:rw - ./voice_mapping.json:/workspace/voice_mapping.json:rw - ./sfx_mapping.json:/workspace/sfx_mapping.json:rw environment: #- TORCH_USE_CUDA_DSA=1 - TORCH_CUDNN_SDPA_ENABLED=1 - TORCH_LOG=perf_hints devices: - nvidia.com/gpu=all healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5004/health-check"] interval: 30s timeout: 10s retries: 3 start_period: 40s deploy: mode: replicated replicas: 2 radio: build: context: . network: host command: python -u tg_tts_service_radio.py networks: - tts volumes: - ./cache:/workspace/cache:rw deploy: mode: replicated replicas: 3 autoheal: image: willfarrell/autoheal volumes: - /var/run/docker.sock:/var/run/docker.sock environment: - AUTOHEAL_CONTAINER_LABEL=all radio-gibberish: build: . command: python -u tg_tts_service_radio_gibberish.py networks: - tts volumes: - ./cache:/workspace/cache:rw environment: # only enable this if you're having gpu errors you need to debug. #- TORCH_USE_CUDA_DSA=1 - TORCH_CUDNN_SDPA_ENABLED=1 - TORCH_LOG=perf_hints devices: - nvidia.com/gpu=all deploy: mode: replicated replicas: 2 frontend api-frontend bind 0.0.0.0:5002 mode http log stdout format raw local0 timeout client 5s option httplog option http-no-delay # ---- ACLs ---- acl is_blips path_beg /tts-blips acl is_radio path_beg /tts-radio acl is_tts path_beg /tts # ---- Routing ---- use_backend blipsapi-backend if is_blips use_backend radioapi-backend if is_radio use_backend ttsapi-backend if is_tts default_backend ttsapi-backend backend ttsapi-backend mode http balance roundrobin option httpchk GET /health-check option redispatch option http-no-delay timeout connect 5s timeout server 5s default-server inter 5s rise 1 fall 10 check server api1 tgtts-qwen3-api-1:5002 check resolvers docker resolve-prefer ipv4 server api2 tgtts-qwen3-api-2:5002 check resolvers docker resolve-prefer ipv4 backend radioapi-backend mode http balance roundrobin option httpchk GET /health-check option redispatch option http-no-delay timeout connect 5s timeout server 5s default-server inter 5s rise 1 fall 10 check server api3 tgtts-qwen3-api-3:5002 check resolvers docker resolve-prefer ipv4 backend blipsapi-backend mode http balance roundrobin option httpchk GET /health-check option redispatch option http-no-delay timeout connect 5s timeout server 5s default-server inter 5s rise 1 fall 10 check server api4 tgtts-qwen3-api-4:5002 check resolvers docker resolve-prefer ipv4 server api5 tgtts-qwen3-api-5:5002 check resolvers docker resolve-prefer ipv4 frontend tts-frontend bind 0.0.0.0:5003 name 0.0.0.0:5003 mode http log global timeout client 5000 option http-no-delay default_backend tts-backend backend tts-backend mode http log global timeout connect 5000 timeout server 5000 balance roundrobin option httpchk GET /health-check #retries 3 #retry-on conn-failure empty-response junk-response 0rtt-rejected option redispatch 1 option http-no-delay server tts1 tgtts-qwen3-tts-1:5003 check resolvers docker resolve-prefer ipv4 frontend blips-frontend bind 0.0.0.0:5004 name 0.0.0.0:5004 mode http log stdout format raw local0 timeout client 5000 option http-no-delay option httplog default_backend blips-backend backend blips-backend mode http log stdout format raw local0 timeout connect 5000 timeout server 5000 balance roundrobin option httpchk GET /health-check retries 3 retry-on conn-failure empty-response junk-response 0rtt-rejected option redispatch 1 option http-no-delay server blips1 tgtts-qwen3-blips-1:5004 check resolvers docker resolve-prefer ipv4 server blips2 tgtts-qwen3-blips-2:5004 check resolvers docker resolve-prefer ipv4 frontend radio-frontend bind 0.0.0.0:5005 name 0.0.0.0:5005 mode http log global timeout client 5000 option http-no-delay default_backend radio-backend backend radio-backend mode http log global timeout connect 5000 timeout server 5000 balance roundrobin option httpchk GET /health-check retries 3 option redispatch 1 option http-no-delay server radio1 tgtts-qwen3-radio-1:5005 check resolvers docker resolve-prefer ipv4 server radio2 tgtts-qwen3-radio-2:5005 check resolvers docker resolve-prefer ipv4 server radio3 tgtts-qwen3-radio-3:5005 check resolvers docker resolve-prefer ipv4 frontend radio-gibberish-frontend bind 0.0.0.0:5006 name 0.0.0.0:5006 mode http log global timeout client 5000 option http-no-delay default_backend radio-gibberish-backend backend radio-gibberish-backend mode http log global timeout connect 5000 timeout server 5000 balance roundrobin option httpchk GET /health-check option redispatch 1 option http-no-delay server radio-gibberish1 tgtts-qwen3-radio-gibberish-1:5006 check resolvers docker resolve-prefer ipv4 server radio-gibberish2 tgtts-qwen3-radio-gibberish-2:5006 check resolvers docker resolve-prefer ipv4 listen stats bind 0.0.0.0:8888 name 0.0.0.0:8888 mode http maxconn 25 timeout client 10000 stats enable stats refresh 5s stats uri / stats scope api-frontend stats scope ttsapi-backend stats scope radioapi-backend stats scope blipsapi-backend stats scope tts-frontend stats scope tts-backend stats scope blips-frontend stats scope blips-backend stats scope radio-frontend stats scope radio-backend stats scope radio-gibberish-frontend stats scope radio-gibberish-backend stats show-desc /tg/Station 13 TTS resolvers docker nameserver dns 127.0.0.11:53 resolve_retries 3 timeout resolve 1s timeout retry 1s hold valid 10s