mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-04-13 09:39:17 +00:00

Updates the service name to 'InstaVoice' and introduces multiple server services to enhance scalability. Modifies GPU resource allocation to use all available devices and adds an NGINX service for reverse proxy capabilities. Simplifies the structure for better management of the API and UI services.
76 lines
1.5 KiB
YAML
76 lines
1.5 KiB
YAML
name: InstaVoice
|
|
services:
|
|
server1:
|
|
build:
|
|
context: ../..
|
|
dockerfile: docker/gpu/Dockerfile
|
|
volumes:
|
|
- ../../api:/app/api
|
|
ports:
|
|
- "8880:8880"
|
|
environment:
|
|
- PYTHONPATH=/app:/app/api
|
|
- USE_GPU=true
|
|
- USE_ONNX=false
|
|
- PYTHONUNBUFFERED=1
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities: [gpu]
|
|
|
|
server2:
|
|
build:
|
|
context: ../..
|
|
dockerfile: docker/gpu/Dockerfile
|
|
volumes:
|
|
- ../../api:/app/api
|
|
ports:
|
|
- "8880:8880"
|
|
environment:
|
|
- PYTHONPATH=/app:/app/api
|
|
- USE_GPU=true
|
|
- USE_ONNX=false
|
|
- PYTHONUNBUFFERED=1
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities: [gpu]
|
|
|
|
server3:
|
|
build:
|
|
context: ../..
|
|
dockerfile: docker/gpu/Dockerfile
|
|
volumes:
|
|
- ../../api:/app/api
|
|
ports:
|
|
- "8880:8880"
|
|
environment:
|
|
- PYTHONPATH=/app:/app/api
|
|
- USE_GPU=true
|
|
- USE_ONNX=false
|
|
- PYTHONUNBUFFERED=1
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities: [gpu]
|
|
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
ports:
|
|
- "80:80" # Expose port 80 on the host machine
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf # Load custom NGINX configuration
|
|
depends_on:
|
|
- server3
|
|
- server1
|
|
- server2
|