ai-chatbot/one_click_deploy.sh
Your Name 53ddb7e585
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
Initial commit - clean repository
2025-12-17 20:15:18 +08:00

39 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
set -e
echo "================================================"
echo " DreamOmni2 一键部署脚本 (本地下载 -> 服务器)"
echo "================================================"
# 0. Prepare Environment
echo "[1/4] 准备本地环境..."
if [ -d "DreamOmni2" ]; then
echo "清理旧的 DreamOmni2 代码..."
rm -rf DreamOmni2
fi
# 1. Clone Code (Try mirror first, then official)
echo "[2/4] 下载代码仓库..."
# 尝试使用 GitHub 镜像加速
if ! git clone https://mirror.ghproxy.com/https://github.com/dvlab-research/DreamOmni2.git; then
echo "镜像下载失败,尝试官方源..."
git clone https://github.com/dvlab-research/DreamOmni2.git
fi
# 2. Download Model
echo "[3/4] 下载模型权重 (Hugging Face)..."
if [ -f "./local_deploy_env/bin/python3" ]; then
./local_deploy_env/bin/python3 download_model.py
else
python3 download_model.py
fi
# 3. Upload and Deploy
echo "[4/4] 上传并部署到服务器..."
chmod +x upload_and_deploy.exp
./upload_and_deploy.exp
echo "================================================"
echo " 部署流程结束!"
echo "================================================"