entrypoint.sh 896 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash -e
  2. echo 'Starting Aphrodite Engine API server...'
  3. CMD="python3 -m aphrodite.endpoints.openai.api_server
  4. --host 0.0.0.0
  5. --port 7860
  6. --download-dir ${HF_HOME:?}/hub
  7. ${MODEL_NAME:+--model $MODEL_NAME}
  8. ${REVISION:+--revision $REVISION}
  9. ${DATATYPE:+--dtype $DATATYPE}
  10. ${KVCACHE:+--kv-cache-dtype $KVCACHE}
  11. ${CONTEXT_LENGTH:+--max-model-len $CONTEXT_LENGTH}
  12. ${NUM_GPUS:+--tensor-parallel-size $NUM_GPUS}
  13. ${GPU_MEMORY_UTILIZATION:+--gpu-memory-utilization $GPU_MEMORY_UTILIZATION}
  14. ${QUANTIZATION:+--quantization $QUANTIZATION}
  15. ${ENFORCE_EAGER:+--enforce-eager}
  16. ${KOBOLD_API:+--launch-kobold-api}
  17. ${CMD_ADDITIONAL_ARGUMENTS}"
  18. # set umask to ensure group read / write at runtime
  19. umask 002
  20. set -x
  21. exec $CMD