Kokoro-FastAPI/docker/gpu/docker-compose.yml

77 lines
1.5 KiB
YAML
Raw Normal View History

name: InstaVoice
services:
server1:
2025-01-15 02:26:28 -07:00
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