refine build scripts

This commit is contained in:
Alex Bezdieniezhnykh
2025-04-30 10:23:06 +03:00
parent 4e2d3c7e4f
commit be8e8bdc56
3 changed files with 24 additions and 135 deletions
+23 -7
View File
@@ -1,7 +1,23 @@
venv\Scripts\python setup.py build_ext
rmdir dist /s /q
pyinstaller --name=azaion-inference ^
--collect-all pyyaml ^
echo Build Cython app
cd %~dp0
echo remove dist folder:
if exist dist rmdir dist /s /q
if exist build rmdir build /s /q
if exist venv rmdir venv /s /q
echo install python and dependencies
python -m venv venv
venv\Scripts\python -m pip install --upgrade pip
venv\Scripts\pip install -r requirements.txt
venv\Scripts\pip install --upgrade pyinstaller pyinstaller-hooks-contrib
venv\Scripts\python setup.py build_ext --inplace
echo install azaion-inference
venv\Scripts\pyinstaller --name=azaion-inference ^
--collect-all jwt ^
--collect-all requests ^
--collect-all psutil ^
@@ -9,6 +25,7 @@ pyinstaller --name=azaion-inference ^
--collect-all zmq ^
--collect-all cryptography ^
--collect-all cv2 ^
--collect-all numpy ^
--collect-all onnxruntime ^
--collect-all tensorrt ^
--collect-all pycuda ^
@@ -32,6 +49,5 @@ pyinstaller --name=azaion-inference ^
--hidden-import remote_command_handler ^
start.py
copy venv\Lib\site-packages\tensorrt_libs\nvinfer_10.dll .\dist\azaion-inference\
copy venv\Lib\site-packages\tensorrt_libs\nvinfer_plugin_10.dll .\dist\azaion-inference\
copy venv\Lib\site-packages\tensorrt_libs\nvonnxparser_10.dll .\dist\azaion-inference\
xcopy /E dist\azaion-inference ..\dist\
copy config.production.yaml ..\dist\config.yaml