RoboTwin_image/install_environment.sh
2025-07-02 03:13:07 +00:00

48 lines
1.3 KiB
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 "===================================="
echo "开始RoboTwin环境配置..."
echo "===================================="
# 获取脚本所在目录的绝对路径
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
# 检查是否已经运行过环境检查
if [ ! -f "environment_check_results.json" ]; then
echo "[警告] 尚未执行环境检查,先运行环境检查..."
./check_environment.sh
# 获取环境检查结果状态
CHECK_STATUS=$?
if [ $CHECK_STATUS -ne 0 ]; then
echo "[错误] 环境检查失败,终止安装过程。"
exit 1
fi
fi
echo -e "\n开始安装RoboTwin环境..."
python script/env_installer.py
# 获取安装脚本结果
SETUP_STATUS=$?
if [ $SETUP_STATUS -eq 0 ]; then
echo -e "\n[成功] RoboTwin环境配置成功完成"
echo "可以使用以下命令激活环境:"
echo " conda activate RoboTwin"
exit 0
else
echo -e "\n[错误] RoboTwin环境配置过程中出现错误请查看日志获取详情。"
exit 1
fi
# chmod +x /mnt/workspace/yibin/dagent/check_prerequisites.sh
# chmod +x /mnt/workspace/yibin/dagent/install_environment.sh
# chmod +x /mnt/workspace/yibin/dagent/check_env_health.sh
# ./check_prerequisites.sh
# ./install_environment.sh
# ./check_env_health.sh