$ErrorActionPreference = "Stop" $Root = Split-Path -Parent $PSScriptRoot Set-Location $Root if (-not (Test-Path ".venv")) { py -3.12 -m venv .venv } $Py = Join-Path $Root ".venv\Scripts\python.exe" & $Py -m pip install --upgrade pip # Keep ORT on CUDA 12.x. ORT >=1.27 defaults to CUDA 13. & $Py -m pip install "onnxruntime-gpu[cuda,cudnn]>=1.24,<1.27" torch huggingface_hub numpy pyzmq if (-not (Test-Path ".vendor\NitroGen")) { New-Item -ItemType Directory -Force ".vendor" | Out-Null git clone https://github.com/MineDojo/NitroGen.git .vendor/NitroGen git -C .vendor/NitroGen checkout 32608444660950ffda95e1e57c79632ad65bea10 } & $Py -m pip install -e .vendor/NitroGen Write-Host "`nReady. Benchmark:" -ForegroundColor Green Write-Host ".\.venv\Scripts\python.exe scripts\benchmark_dit.py" Write-Host "Gameplay server (fast profile):" Write-Host ".\.venv\Scripts\python.exe scripts\serve_onnx.py --steps 4"