Download install.ps1 from ryugyosoft/onwx: direct link, hf CLI and curl.
- Browser
- Download file 1.8 kB
-
https://huggingface.co/ryugyosoft/onwx/resolve/main/install.ps1
- Command line
-
hf download hf://ryugyosoft/onwx/install.ps1
-
curl -L -o install.ps1 https://huggingface.co/ryugyosoft/onwx/resolve/main/install.ps1
1.8 kB
| # onwx one-line installer for Windows. In PowerShell: | |
| # irm https://huggingface.co/ryugyosoft/onwx/resolve/main/install.ps1 | iex | |
| # Downloads onwx into %LOCALAPPDATA%\onwx (no git / hf needed) and runs setup.bat, which finds or installs Python, | |
| # sets up the environment, adds "onwx" to the Start menu and starts the tray app. Run it again to update onwx. | |
| $ErrorActionPreference = "Stop" | |
| $ProgressPreference = "SilentlyContinue" | |
| $repo = "ryugyosoft/onwx" | |
| $dest = Join-Path $env:LOCALAPPDATA "onwx" | |
| Write-Host "" | |
| Write-Host "onwx - LLMs on the AMD Ryzen AI NPU" | |
| Write-Host "Installing into $dest ..." | |
| function Get-WithRetry($uri, $out) { | |
| for ($i = 1; $i -le 4; $i++) { | |
| try { | |
| if ($out) { Invoke-WebRequest -UseBasicParsing -Uri $uri -OutFile $out; return } | |
| return Invoke-RestMethod $uri | |
| } catch { | |
| if ($i -eq 4) { throw } | |
| Write-Host " retrying ($($_.Exception.Message)) ..." | |
| Start-Sleep -Seconds (2 * $i) | |
| } | |
| } | |
| } | |
| $info = Get-WithRetry "https://huggingface.co/api/models/$repo" $null | |
| foreach ($s in $info.siblings) { | |
| $f = $s.rfilename | |
| if ($f -eq ".gitattributes") { continue } | |
| $out = Join-Path $dest ($f -replace "/", "\") | |
| New-Item -ItemType Directory -Force -Path (Split-Path $out) | Out-Null | |
| Get-WithRetry "https://huggingface.co/$repo/resolve/main/$f" $out | |
| } | |
| Set-Content -Path (Join-Path $dest ".onwx-installed") -Value "installer" -Encoding ascii # onwx may update itself here | |
| Write-Host "Downloaded $($info.siblings.Count - 1) files. Starting setup (Python, packages, Start menu, tray) ..." | |
| Start-Process -FilePath (Join-Path $dest "setup.bat") -WorkingDirectory $dest | |
| Write-Host "A setup window opened. When it finishes, onwx appears in the task tray and asks which model to download." | |