gen / entrypoint.sh
AnesKAM's picture
Create entrypoint.sh
82225fa verified
Raw History Blame Contribute Delete
677 Bytes
#!/usr/bin/env bash
set -euo pipefail
# โ”€โ”€ ู…ุฌู„ุฏุงุช /data (ูˆู‚ุช ุงู„ุชุดุบูŠู„ ูู‚ุท) โ”€โ”€
mkdir -p /data/workspace /data/cache /data/tmp /data/db
# โ”€โ”€ ุชูˆุฌูŠู‡ ุงู„ุชุฎุฒูŠู† ุงู„ู…ุคู‚ุช ุฅู„ู‰ /data โ”€โ”€
export DATA_DIR="${DATA_DIR:-/data}"
export TMPDIR=/data/tmp
export XDG_CACHE_HOME=/data/cache
export HF_HOME=/data/cache/huggingface
export HF_HUB_CACHE=/data/cache/huggingface/hub
# โ”€โ”€ ุงู„ู…ู†ูุฐ (HF ูŠุชูˆู‚ุน 7860) โ”€โ”€
export PORT="${PORT:-7860}"
echo "Genisi starting on port ${PORT}, DATA_DIR=${DATA_DIR}"
exec uvicorn app.main:app \
--host 0.0.0.0 \
--port "${PORT}" \
--proxy-headers \
--forwarded-allow-ips='*'