Spaces:
Running
Running
Download scripts/build_exe.ps1 from iparaco/Virtual-LPU: direct link, hf CLI and curl.
- Browser
- Download file 1.5 kB
-
https://huggingface.co/spaces/iparaco/Virtual-LPU/resolve/refs%2Fpr%2F2/scripts/build_exe.ps1
- Command line
-
hf download hf://spaces/iparaco/Virtual-LPU@refs/pr/2/scripts/build_exe.ps1
-
curl -L -o build_exe.ps1 https://huggingface.co/spaces/iparaco/Virtual-LPU/resolve/refs%2Fpr%2F2/scripts/build_exe.ps1
1.5 kB
| # LPU AI Accelerator V7 — desktop .exe build (optional, one command) | |
| # Produces dist\LPUAccelerator.exe: a standalone NATIVE window app | |
| # (WebView2). No browser window, no Python install needed to run it. | |
| $ErrorActionPreference = "Stop" | |
| $here = Split-Path -Parent $MyInvocation.MyCommand.Path | |
| $root = Split-Path -Parent $here | |
| $venv = "$root\.venv-build" | |
| $py = "$venv\Scripts\python.exe" | |
| Write-Host "== 1/3 build venv (pyinstaller + pywebview) ==" | |
| & "C:\Ipara.co\Scripts\python.exe" -m venv $venv | |
| & $py -m pip install --upgrade pip | Out-Null | |
| & $py -m pip install -r "$root\requirements.txt" | |
| & $py -m pip install pyinstaller pywebview | |
| if ($LASTEXITCODE -ne 0) { throw "deps failed" } | |
| Write-Host "== 2/3 freeze the desktop app ==" | |
| & $py -m PyInstaller --noconfirm --clean --onefile --windowed ` | |
| --name "LPUAccelerator" ` | |
| --add-data "$root\frontend\dashboard.html;frontend" ` | |
| --add-data "$root\configs\lpu_config_v7.yaml;configs" ` | |
| --hidden-import uvicorn.logging ` | |
| --hidden-import uvicorn.loops.auto ` | |
| --hidden-import uvicorn.protocols.http.auto ` | |
| --hidden-import uvicorn.protocols.websockets.auto ` | |
| --hidden-import uvicorn.lifespan.on ` | |
| "$root\run_lpu_desktop.py" | |
| if ($LASTEXITCODE -ne 0) { throw "pyinstaller failed" } | |
| Write-Host "== 3/3 done ==" | |
| Write-Host "EXE : $root\dist\LPUAccelerator.exe" | |
| Write-Host "First run : creates %LOCALAPPDATA%\LPU (state, DB, logs)" | |
| Write-Host "Close X : stops ONLY the accelerator - training is never touched" | |