17 lines
416 B
Bash
17 lines
416 B
Bash
#!/bin/bash
|
||
# 启动远光软件微调平台后端服务
|
||
|
||
cd "$(dirname "$0")"
|
||
|
||
# 检查并安装依赖
|
||
if ! python3 -c "import flask" 2>/dev/null; then
|
||
echo "正在安装依赖..."
|
||
pip install -r ../requirements.txt
|
||
fi
|
||
|
||
# 启动服务
|
||
echo "启动后端服务..."
|
||
nohup python3 main.py &
|
||
# 日志会写入 logs/ 目录,同时输出到 stdout(Docker 日志可见)
|
||
echo "后端服务已在后台启动"
|