1
0
Fork 0

fix(exe): add build script for Windows bundle

This commit is contained in:
Sean Sube 2023-04-30 14:24:43 -05:00
parent 572a5159ad
commit a76ded2a98
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
4 changed files with 28 additions and 2 deletions

4
exe/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
build/
dist/
commit.txt

22
exe/build.bat Normal file
View File

@ -0,0 +1,22 @@
REM activate venv
..\api\onnx_env\Scripts\Activate.bat
REM build bundle
pyinstaller win10.directml.dir.spec
REM add additional files
xcopy \gfpgan \dist\server\gfpgan /t /e
xcopy ..\api\gui \dist\client /t /e
xcopy ..\api\schemas \dist\schemas /t /e
xcopy ..\api\logging.yaml \dist\logging.yaml
xcopy ..\api\params.json \dist\params.json
xcopy ..\docs \dist\docs /t /e
xcopy ..\models \dist\models /t /e
xcopy ..\outputs \dist\outputs /t /e
REM get commit info
git rev-parse HEAD > commit.txt
set /p GIT_SHA=<commit.txt
REM create archive
7za a ..\dist\onnx-web-v0.10.0-rc-%GIT_SHA%.zip "\dist\*"

View File

@ -6,7 +6,7 @@ set ONNX_WEB_OUTPUT_PATH=%ONNX_WEB_BASE_PATH%\outputs
REM customize these as needed REM customize these as needed
set ONNX_WEB_CACHE_MODELS=0 set ONNX_WEB_CACHE_MODELS=0
set ONNX_WEB_EXTRA_MODELS=%ONNX_WEB_BASE_PATH%\models\onnx-web-extras.json set ONNX_WEB_EXTRA_MODELS=%ONNX_WEB_BASE_PATH%\extras.json
REM convert models and launch the server REM convert models and launch the server
@echo Launching onnx-web in fp32 mode... @echo Launching onnx-web in fp32 mode...

View File

@ -7,7 +7,7 @@ set ONNX_WEB_OUTPUT_PATH=%ONNX_WEB_BASE_PATH%\outputs
REM customize these as needed REM customize these as needed
set ONNX_WEB_BLOCK_PLATFORMS=cpu set ONNX_WEB_BLOCK_PLATFORMS=cpu
set ONNX_WEB_CACHE_MODELS=0 set ONNX_WEB_CACHE_MODELS=0
set ONNX_WEB_EXTRA_MODELS=%ONNX_WEB_BASE_PATH%\models\onnx-web-extras.json set ONNX_WEB_EXTRA_MODELS=%ONNX_WEB_BASE_PATH%\models\extras.json
REM convert models and launch the server REM convert models and launch the server
@echo Launching onnx-web in fp16 mode... @echo Launching onnx-web in fp16 mode...