Files
multi_camera/start.sh

41 lines
904 B
Bash
Executable File
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
# 多摄像头实时监控系统启动脚本
echo "🚀 启动多摄像头实时监控系统..."
# 检查Python是否安装
if ! command -v python3 &> /dev/null; then
echo "❌ 错误: 未找到Python3请先安装Python3"
exit 1
fi
# 检查依赖是否安装
echo "📦 检查依赖包..."
python3 -c "import flask" 2>/dev/null
if [ $? -ne 0 ]; then
echo "📥 安装Flask..."
pip3 install Flask==2.3.3
fi
python3 -c "import requests" 2>/dev/null
if [ $? -ne 0 ]; then
echo "📥 安装requests..."
pip3 install requests==2.31.0
fi
python3 -c "import dotenv" 2>/dev/null
if [ $? -ne 0 ]; then
echo "📥 安装python-dotenv..."
pip3 install python-dotenv==1.0.0
fi
python3 -c "import psutil" 2>/dev/null
if [ $? -ne 0 ]; then
echo "📥 安装psutil..."
pip3 install psutil==5.9.6
fi
# 启动应用
echo "🎬 启动应用..."
python3 run.py