This commit is contained in:
ywb
2026-06-01 18:27:36 +08:00
parent 74ec30ba3f
commit e7c9621c65
7 changed files with 39 additions and 12 deletions
+8 -1
View File
@@ -2,4 +2,11 @@
# 启动机械臂服务端
cd ~/work/arm_server
python3 arm_server.py
PYTHON_BIN="${PYTHON_BIN:-/usr/bin/python3}"
if ! "$PYTHON_BIN" -c "import flask" >/dev/null 2>&1; then
echo "Flask 未安装,正在安装 requirements.txt..."
"$PYTHON_BIN" -m pip install --user -r requirements.txt
fi
exec "$PYTHON_BIN" arm_server.py