Files
AI_A4000/video_worker/scripts/run_server.sh
2026-04-07 00:37:39 +08:00

23 lines
456 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"
if [ ! -d .venv ]; then
echo "[ERROR] .venv not found, run scripts/install_wsl_env.sh first"
exit 1
fi
if [ ! -f .env ]; then
echo "[ERROR] .env not found, copy from .env.example"
exit 1
fi
source .venv/bin/activate
set -a
source .env
set +a
python -m uvicorn app.main:app --host "${APP_HOST:-0.0.0.0}" --port "${APP_PORT:-8000}"