Files
annotations/Azaion.Inference/build.cmd
T
Deen 4bca61d859 Update build.cmd
updated collection of libs/submodules for cv2
2025-04-30 12:52:50 +03:00

53 lines
1.4 KiB
Batchfile

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 --no-cache-dir -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-submodules cv2 ^
--add-data "venv\Lib\site-packages\cv2;cv2" ^
--collect-all requests ^
--collect-all psutil ^
--collect-all msgpack ^
--collect-all zmq ^
--collect-all cryptography ^
--collect-all numpy ^
--collect-all onnxruntime ^
--collect-all tensorrt ^
--collect-all pycuda ^
--collect-all pynvml ^
--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 config.production.yaml ..\dist\config.yaml