docker-compose.yml 748 B

1234567891011121314151617181920212223242526272829
  1. services:
  2. aphrodite-engine:
  3. build:
  4. context: .
  5. restart: on-failure:5
  6. environment:
  7. - NUM_GPUS=${NUM_GPUS}
  8. - MODEL_NAME=${MODEL_NAME}
  9. - REVISION=${REVISION}
  10. - HUGGING_FACE_HUB_TOKEN=${HUGGING_FACE_HUB_TOKEN}
  11. - QUANTIZATION=${QUANTIZATION}
  12. - KVCACHE=${KVCACHE}
  13. - API_KEY=${API_KEY}
  14. - CONTEXT_LENGTH=${CONTEXT_LENGTH}
  15. - GPU_MEMORY_UTILIZATION=${GPU_MEMORY_UTILIZATION}
  16. - ENFORCE_EAGER=${ENFORCE_EAGER}
  17. volumes:
  18. - ${HOME}/.cache:/root/.cache/
  19. shm_size: 10g
  20. ports:
  21. - "7860:7860"
  22. - "2242:2242"
  23. deploy:
  24. resources:
  25. reservations:
  26. devices:
  27. - driver: nvidia
  28. count: all
  29. capabilities: [gpu]