21 lines
736 B
Bash
21 lines
736 B
Bash
|
|
#!/usr/bin/env bash
|
|||
|
|
# 在「单一 Python 环境」下启动网关:FishMeasure / FishAction 子进程默认使用同一解释器。
|
|||
|
|
#
|
|||
|
|
# conda activate fishserver
|
|||
|
|
# export PUBLIC_BASE_URL=http://<本机对外IP>:8001 # 可选,填 video URL 前缀
|
|||
|
|
# PORT=8001 bash scripts/run_fishserver.sh
|
|||
|
|
#
|
|||
|
|
set -euo pipefail
|
|||
|
|
|
|||
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|||
|
|
cd "$ROOT/fish_api"
|
|||
|
|
|
|||
|
|
export PUBLIC_BASE_URL="${PUBLIC_BASE_URL:-http://127.0.0.1:8000}"
|
|||
|
|
# 单一环境:勿设置 PYTHON_FISH_MEASURE / PYTHON_FISH_ACTION,使用当前 uvicorn 的 Python
|
|||
|
|
unset PYTHON_FISH_MEASURE PYTHON_FISH_ACTION 2>/dev/null || true
|
|||
|
|
|
|||
|
|
PORT="${PORT:-8000}"
|
|||
|
|
HOST="${HOST:-0.0.0.0}"
|
|||
|
|
|
|||
|
|
exec uvicorn app.main:app --host "$HOST" --port "$PORT"
|