Files
sentinel-home-ai/scripts/start_ui.sh

24 lines
571 B
Bash
Executable File

#!/bin/bash
# FAM-UI 启动脚本 (NAS 端)
# 用法: ./scripts/start_ui.sh
set -e
APP_DIR="$(cd "$(dirname "$0")/.." && pwd)/fam-ui"
CONFIG_FILE="$APP_DIR/config/config.yaml"
if [ ! -f "$CONFIG_FILE" ]; then
echo "错误: 配置文件不存在: $CONFIG_FILE"
echo "请复制 config.yaml.example 为 config.yaml 并修改实际值"
exit 1
fi
cd "$APP_DIR"
# 检查虚拟环境
if [ -d "venv" ]; then
source venv/bin/activate
fi
echo "启动 FAM-UI Streamlit (端口 8501)..."
exec streamlit run src/app.py --server.port 8501 --server.address 0.0.0.0