Files
DinQuant/backend_api_python/start.sh
T
TIANHE f43312a858 creat
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2025-12-29 03:06:49 +08:00

27 lines
645 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# QuantDinger Python API 启动脚本
# 激活虚拟环境(如果使用虚拟环境)
# source venv/bin/activate
# 检查依赖是否安装
if ! python -c "import flask" 2>/dev/null; then
echo "正在安装依赖..."
pip install -r requirements.txt
fi
# 启动服务
echo "启动 QuantDinger Python API 服务..."
echo "服务地址: http://0.0.0.0:5000"
# 创建日志目录
mkdir -p logs
# 开发环境(使用新的入口文件)
python run.py
# 生产环境(使用 gunicorn
# gunicorn -w 4 -b 0.0.0.0:5000 --timeout 120 --access-logfile logs/access.log --error-logfile logs/error.log "run:create_app()"