Closed holgerpieta closed 9 months ago
Uhm, it generally seems like the Windows Python installer is broken and/or incomplete.
The launch.bat is lacking the call to activate.bat
, so it doesn't work at all.
After fixing that, it starts and the server is reachable, but when accessing 127.0.0.1:5000
in the browser I just get a 404, so something isn't working, but I don't know what.
When you say Windows Python installer, which method is that? Using a pre-installed Python on Windows, or the Windows bundle, or something else?
I will fix the call
s in the launch scripts, and have some work to do on the docs before the next release (#368, #328), so I will make sure to mention the setup files.
If you are running the API server from a clone of the repo, you may need to build or download the GUI files as well. You can grab a copy from the gh-pages
branch: https://github.com/ssube/onnx-web/tree/gh-pages/v0.10.0
The Windows bundle comes with the GUI files, but if you cloned the repo, they will be missing. Download (or build and copy) them into https://github.com/ssube/onnx-web/tree/main/api/gui, and that should work.
There were at least two parts to this, and I believe both are now fixed:
launch.bat
calls the venv Activate.bat
before doing anything else (same with the PS1 script)I was hoping to add the GUI download to the launch script, but it looks like that might only work reliably within powershell (https://stackoverflow.com/questions/4619088/windows-batch-file-file-download-from-a-url), so that's covered in the setup documentation for now.
The launch.bat script now has a check for the web UI files and the launch.ps1 script will check for and download them if they are not found.
The
setup-*.bat
files inapi/
just callonnx_env\Scripts\activate.bat
in line 2, which will terminate the script after calling the activate script. Instead they mustcall
the activate script, e.g. like thiscall onnx_env\Scripts\activate.bat
to continue and perform the following commands.Also the setup guide for Windows is somewhat incomplete, as it does not mention that the
setup-*.bat
files can be found inapi/
.