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
+1 -53
View File
@@ -20,59 +20,7 @@ mkdir dist\dummy
move dist\Azaion.Annotator.dll dist\dummy\
move dist\Azaion.Dataset.dll dist\dummy\
echo Build Cython app
cd Azaion.Inference
echo remove dist folder:
if exist dist rmdir dist /s /q
echo install python and dependencies
python -m venv venv
venv\Scripts\pip install -r requirements.txt
venv\Scripts\pip uninstall -y opencv-python
venv\Scripts\pip install opencv-python
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 ^
--collect-all msgpack ^
--collect-all zmq ^
--collect-all cryptography ^
--collect-all cv2 ^
--collect-all onnxruntime ^
--collect-all tensorrt ^
--collect-all pycuda ^
--collect-all pynvml ^
--collect-all re ^
--collect-all boto3 ^
--hidden-import constants ^
--hidden-import annotation ^
--hidden-import credentials ^
--hidden-import file_data ^
--hidden-import user ^
--hidden-import security ^
--hidden-import secure_model ^
--hidden-import cdn_manager ^
--hidden-import api_client ^
--hidden-import hardware_service ^
--hidden-import remote_command ^
--hidden-import ai_config ^
--hidden-import inference_engine ^
--hidden-import inference ^
--hidden-import remote_command_handler ^
start.py
xcopy /E dist\azaion-inference ..\dist\
copy venv\Lib\site-packages\tensorrt_libs\nvinfer_10.dll ..\dist
copy venv\Lib\site-packages\tensorrt_libs\nvinfer_plugin_10.dll ..\dist
copy venv\Lib\site-packages\tensorrt_libs\nvonnxparser_10.dll ..\dist
copy config.production.yaml ..\dist\config.yaml
cd..
call Azaion.Inference\build.cmd
echo Download onnx model
cd build