docker-compose.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. services:
  2. kokoro-fastapi:
  3. image: ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.4
  4. container_name: kokoro-fastapi
  5. restart: unless-stopped
  6. volumes:
  7. - ${MODELS_DIR}/models:/app/api/src/models
  8. - ${MODELS_DIR}/voices:/app/api/src/voices
  9. ports:
  10. - "8880:8880"
  11. environment:
  12. - USE_GPU=true
  13. - PYTHONUNBUFFERED=1
  14. - REPO_ID=hexgrad/Kokoro-82M
  15. healthcheck:
  16. test: ["CMD", "curl", "-f", "http://localhost:8880/health"]
  17. interval: 20s
  18. timeout: 5s
  19. retries: 5
  20. start_period: 90s
  21. deploy:
  22. resources:
  23. reservations:
  24. devices:
  25. - driver: nvidia
  26. device_ids: ['0']
  27. capabilities: [gpu]
  28. kokoro-wyoming:
  29. build: kokoro-wyoming
  30. container_name: kokoro-wyoming
  31. depends_on:
  32. kokoro-fastapi:
  33. condition: service_healthy
  34. links:
  35. - kokoro-fastapi
  36. ports:
  37. - "10200:10200"
  38. restart: unless-stopped
  39. tty: true
  40. stdin_open: true
  41. environment:
  42. - API_HOST=http://kokoro-fastapi # Set TTS service URL
  43. - API_PORT=8880 # Set TTS service PORT
  44. - VOICE_SPEED=${VOICE_SPEED}
  45. - DOCKER_BUILDKIT=0
  46. labels:
  47. com.centurylinklabs.watchtower.enable: false