Major changes: - New frontend (platform/web/): Vite + React 18 + TypeScript + Tailwind - 4-module navigation: 数据送标 / 模型管理 / 车队管理 / 系统管理 - Data catalog with charts (DMS/ADAS/Lane 3-tab view) - Quality review workflow (标注质检): Good/Fine/Bad scoring with auto-advance - Audit enhancements: batch operations, rejection categories, Feishu notifications - Operation audit log (操作日志) - World model simulation studio (仿真工坊) - Dataset version management with snapshots and diff - ADAS 7-class dataset integration (138K images organized + compressed) - User management with Feishu integration and pagination - CRUD/search/filter on all pages, card layout redesign - PIL-optimized image overlay rendering - Auto-snapshot on build, in_review workflow stage - Removed embedded algorithm code (now in workspace)
50 lines
1.5 KiB
Bash
50 lines
1.5 KiB
Bash
#!/usr/bin/env bash
|
||
# 本机直跑(不用 Docker 跑 platform/worker)
|
||
# 依赖: pip install -r requirements.txt
|
||
# PostgreSQL 可选;不可用时自动回退 SQLite
|
||
set -euo pipefail
|
||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||
export PYTHONPATH="${ROOT}/platform${PYTHONPATH:+:$PYTHONPATH}"
|
||
|
||
if [[ -f "$ROOT/.env" ]]; then
|
||
set -a
|
||
# shellcheck disable=SC1091
|
||
source "$ROOT/.env"
|
||
set +a
|
||
fi
|
||
|
||
if [[ -f "$ROOT/manifests/feishu.env" ]]; then
|
||
set -a
|
||
# shellcheck disable=SC1091
|
||
source "$ROOT/manifests/feishu.env"
|
||
set +a
|
||
fi
|
||
|
||
export AS_JOB_EXECUTOR="${AS_JOB_EXECUTOR:-thread}"
|
||
|
||
# .env 中 AS_REDIS_PORT=6380 时与 feishu.env 默认 6379 对齐
|
||
if [[ -n "${AS_REDIS_PORT:-}" ]]; then
|
||
export AS_REDIS_URL="redis://127.0.0.1:${AS_REDIS_PORT}/0"
|
||
fi
|
||
|
||
cd "$ROOT"
|
||
bash scripts/setup_links.sh 2>/dev/null || true
|
||
|
||
if ! python - <<'PY' 2>/dev/null; then
|
||
from as_platform.db.engine import check_connection
|
||
raise SystemExit(0 if check_connection() else 1)
|
||
PY
|
||
export AS_DATABASE_URL="${AS_DATABASE_URL:-sqlite:///${ROOT}/manifests/platform.db}"
|
||
echo "PostgreSQL 不可用,使用 SQLite: ${AS_DATABASE_URL}"
|
||
fi
|
||
|
||
python scripts/wait_for_db.py
|
||
python scripts/db_migrate_from_sqlite.py 2>/dev/null || true
|
||
|
||
echo ""
|
||
echo "启动平台 API: http://127.0.0.1:${AS_PLATFORM_PORT:-8787}"
|
||
echo "开发登录: AS_DEV_AUTH=true 时在登录页点「开发登录」"
|
||
echo ""
|
||
|
||
exec python -m as_platform.api.server --host "${AS_PLATFORM_HOST:-127.0.0.1}" --port "${AS_PLATFORM_PORT:-8787}" "$@"
|