fix(exe): add build script for Windows bundle
This commit is contained in:
parent
572a5159ad
commit
a76ded2a98
|
@ -0,0 +1,4 @@
|
|||
build/
|
||||
dist/
|
||||
|
||||
commit.txt
|
|
@ -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\*"
|
|
@ -6,7 +6,7 @@ set ONNX_WEB_OUTPUT_PATH=%ONNX_WEB_BASE_PATH%\outputs
|
|||
|
||||
REM customize these as needed
|
||||
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
|
||||
@echo Launching onnx-web in fp32 mode...
|
||||
|
|
|
@ -7,7 +7,7 @@ set ONNX_WEB_OUTPUT_PATH=%ONNX_WEB_BASE_PATH%\outputs
|
|||
REM customize these as needed
|
||||
set ONNX_WEB_BLOCK_PLATFORMS=cpu
|
||||
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
|
||||
@echo Launching onnx-web in fp16 mode...
|
||||
|
|
Loading…
Reference in New Issue