[6.0] 部署脚本与文档 - start_core/edge/ui.sh + DEPLOY.md 部署指南
This commit is contained in:
23
scripts/start_ui.sh
Executable file
23
scripts/start_ui.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user