entrypoint.sh 720 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. set -xe
  3. cd /app/aphrodite-engine
  4. echo 'Starting Aphrodite Engine API server...'
  5. CMD="python3 -m aphrodite.endpoints.openai.api_server \
  6. --host 0.0.0.0 \
  7. --port 7860 \
  8. --model $MODEL_NAME \
  9. --tensor-parallel-size $NUM_GPUS \
  10. --dtype $DATATYPE \
  11. --max-model-len $CONTEXT_LENGTH \
  12. --gmu $GPU_MEMORY_UTILIZATION"
  13. if [ -n "$QUANTIZATION" ]; then
  14. CMD="$CMD --quantization $QUANTIZATION --dtype half"
  15. fi
  16. if [ -n "$API_KEY" ]; then
  17. CMD="$CMD --api-keys $API_KEY"
  18. fi
  19. if [ -n "$ENFORCE_EAGER" ]; then
  20. CMD="$CMD --enforce-eager"
  21. fi
  22. if [ -n "$KVCACHE" ]; then
  23. CMD="$CMD --kv-cache-dtype $KVCACHE"
  24. fi
  25. exec $CMD