File size: 677 Bytes
82225fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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='*'