#!/bin/bash set -e echo '== SETUP ==' apt-get update -qq && apt-get install -y -qq git build-essential ffmpeg >/dev/null 2>&1 git clone -q https://github.com/vibevoice-community/VibeVoice /VibeVoice-classic git -C /VibeVoice-classic checkout -q d5895e7 git clone -q https://github.com/vibevoice-community/VibeVoice /vv-main git clone -q https://github.com/voicepowered-ai/VibeVoice-finetuning /vvft cd /vvft && pip install -q -e . 2>&1 | tail -1 pip uninstall -y -q transformers 2>&1 | tail -1 pip install -q 'setuptools<81' 'torch==2.6.0' 'transformers==4.51.3' 'peft==0.15.2' 'diffusers==0.29.0' 'safetensors==0.5.3' 'datasets==3.6.0' 'resampy==0.4.3' 'librosa==0.11.0' 'numpy<2' 'resemble-perth==1.0.1' 'omegaconf==2.3.0' 'conformer==0.3.2' 's3tokenizer' 'soundfile' 'jiwer' 'resemblyzer' 2>&1 | tail -1 echo '== PREFLIGHT ==' for b in git gcc ffmpeg; do command -v $b >/dev/null || { echo "PREFLIGHT FAIL: missing binary $b"; exit 2; }; done python - <<'PF' import importlib from huggingface_hub import HfApi for m, v in [("torch", "2.6.0"), ("transformers", "4.51.3"), ("peft", "0.15.2"), ("diffusers", "0.29.0"), ("resemblyzer", None), ("webrtcvad", None)]: mod = importlib.import_module(m) if v: assert mod.__version__.split('+')[0] == v, f"{m} {mod.__version__} != {v}" api = HfApi() files = api.list_repo_files("ACloudCenter/vibevoice-lora-joint", repo_type="model") assert any(f == "epoch2/checkpoint-900/lora/adapter_config.json" for f in files), "lora adapter_config missing in checkpoint-900" assert api.repo_exists("ACloudCenter/vibevoice-eval-jointv1", repo_type="model"), "eval repo missing" print("PREFLIGHT OK", flush=True) PF echo '== FETCH (resolve/main — standalone script, no patching) ==' python -c "import urllib.request; urllib.request.urlretrieve('https://huggingface.co/datasets/ACloudCenter/fast-vibevoice-notes/resolve/main/eval_joint2.py', '/eval_joint2.py')" python - <<'GUARD' s = open('/eval_joint2.py').read() assert 'v2.1' in s and 'epoch2/checkpoint-900/lora' in s and 'EVAL DONE' in s and "fh.read()" in s, 'wrong revision on main' print('GUARD OK: v2.1 on main', flush=True) GUARD echo '== RUN EVAL ==' python /eval_joint2.py 2>&1 | tee /tmp/joblog.txt echo '== LOG PUSH ==' python - <<'LOG' from huggingface_hub import HfApi try: HfApi().upload_file(path_or_fileobj="/tmp/joblog.txt", path_in_repo="eval-log-joint2.txt", repo_id="ACloudCenter/fast-vibevoice-notes", repo_type="dataset") print("LOG OK", flush=True) except Exception as e: print("LOG FAIL", e, flush=True) LOG