Files
AI_A4000/video_worker/scripts/one_click_wsl.sh
2026-04-07 01:00:56 +08:00

24 lines
528 B
Bash

#!/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 in WSL environment"
exit 1
fi
if [ ! -d .venv ]; then
echo "[INFO] .venv not found, running install_wsl_env.sh"
bash scripts/install_wsl_env.sh
fi
if [ ! -f .env ]; then
echo "[INFO] .env not found, copying from .env.example"
cp .env.example .env
fi
echo "[INFO] launching server in WSL"
exec bash scripts/run_server.sh