Kokoro-FastAPI/docker/gpu/docker-compose.yml
rvuyyuru2 6d717437c9 Renames service and expands Docker configuration
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.
2025-01-25 21:55:53 +05:30

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