feat: 新增代码
This commit is contained in:
31
video_worker/scripts/install_wsl_env.sh
Executable file
31
video_worker/scripts/install_wsl_env.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
if ! command -v python3 >/dev/null 2>&1; then
|
||||
echo "[ERROR] python3 not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ffmpeg
|
||||
else
|
||||
echo "[WARN] apt-get unavailable, please install ffmpeg manually"
|
||||
fi
|
||||
|
||||
mkdir -p outputs runtime runtime/logs models/ltx models/hunyuan
|
||||
|
||||
if [ ! -f .env ]; then
|
||||
cp .env.example .env
|
||||
fi
|
||||
|
||||
echo "[OK] install completed"
|
||||
echo "next: source .venv/bin/activate && bash scripts/run_server.sh"
|
||||
Reference in New Issue
Block a user