Files
AI_A4000/video_worker/scripts/install_wsl_env.sh
2026-04-07 00:37:39 +08:00

32 lines
716 B
Bash
Executable File

#!/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"