Download setup.bat from ryugyosoft/onwAMD: direct link, hf CLI and curl.
- Browser
- Download file 2.31 kB
-
https://huggingface.co/ryugyosoft/onwAMD/resolve/main/setup.bat
- Command line
-
hf download hf://ryugyosoft/onwAMD/setup.bat
-
curl -L -o setup.bat https://huggingface.co/ryugyosoft/onwAMD/resolve/main/setup.bat
2.31 kB
| @echo off | |
| rem onw AMD - Ore no NPU ga konna ni ugoku wake nai: install the resident tray app (Windows, AMD Ryzen AI NPU). | |
| rem Finds Python 3.10+ (offers to install it with winget), creates .venv, installs onw + the tray, adds "onw" to | |
| rem the Start menu and starts it in the task tray. FastFlowLM and the models are downloaded later from the | |
| rem onw window (Models tab). | |
| setlocal | |
| cd /d "%~dp0" | |
| set PYTHONUTF8=1 | |
| if not exist ".venv\installed-tray.txt" goto create | |
| rem an older install has the tray but not the window's web view package: install it | |
| ".venv\Scripts\python.exe" -c "import webview" >nul 2>&1 && goto shortcut | |
| :create | |
| if exist ".venv\Scripts\python.exe" goto install | |
| call "%~dp0find_python.bat" | |
| if not defined PY ( | |
| pause | |
| exit /b 1 | |
| ) | |
| echo [setup] creating Python environment in .venv ... | |
| %PY% -m venv .venv | |
| if errorlevel 1 ( | |
| echo [setup] could not create the Python environment. | |
| pause | |
| exit /b 1 | |
| ) | |
| :install | |
| rem (the bundled pip is fine; a newer pip once failed to install packages that have scripts, so it is not upgraded) | |
| ".venv\Scripts\python.exe" -m pip install -e .[tray] | |
| if not errorlevel 1 goto installed | |
| if defined RETRIED ( | |
| echo [setup] package installation failed. | |
| pause | |
| exit /b 1 | |
| ) | |
| echo [setup] installation failed; rebuilding the Python environment once ... | |
| set RETRIED=1 | |
| rmdir /s /q .venv | |
| if not defined PY call "%~dp0find_python.bat" | |
| %PY% -m venv .venv | |
| goto install | |
| :installed | |
| echo ok> ".venv\installed.txt" | |
| echo ok> ".venv\installed-tray.txt" | |
| :shortcut | |
| rem Start menu entry: pythonw -m onw tray (no console window) | |
| set "PYW=%CD%\.venv\Scripts\pythonw.exe" | |
| powershell -NoProfile -Command ^ | |
| "$s = (New-Object -ComObject WScript.Shell).CreateShortcut([Environment]::GetFolderPath('Programs') + '\onw AMD.lnk');" ^ | |
| "$s.TargetPath = '%PYW%'; $s.Arguments = '-m onw tray'; $s.WorkingDirectory = '%CD%';" ^ | |
| "$s.Description = 'onw AMD - LLMs on the AMD Ryzen AI NPU'; $s.IconLocation = '%CD%\onw\web\icon.ico,0'; $s.Save()" | |
| echo [setup] Start menu: onw AMD | |
| echo [start] onw AMD is starting in the task tray. Pick a model to download in the window that opens. | |
| rem --replace: a tray already running (an update by the one-line installer) restarts on the new files | |
| start "" "%PYW%" -m onw tray --replace | |