improve setup script, reduce libs .so size (strip)

This commit is contained in:
Mathieu Broillet 2024-08-04 20:36:34 +02:00
parent 87e2d6dd7b
commit 59a54945ff
Signed by: mathieu
GPG Key ID: C4A6176ABC6B2DFC
3 changed files with 17 additions and 3 deletions

View File

@ -1,2 +1,14 @@
pyinstaller --noconfirm --console --add-data libs:. --add-data assets:assets --add-data static:static --add-data templates:templates --name easy-local-alpr-1.4.0-openvinocpu_linux_x86_64 "alpr_api.py"
# optional: --onefile
#!/bin/bash
VERSION=1.5.0
rm -rf buildenv build dist *.spec
python3.10 -m venv buildenv
source buildenv/bin/activate
python3.10 -m pip install --upgrade pip pyinstaller
python3.10 -m pip install ./wheel/ultimateAlprSdk-3.0.0-cp310-cp310-linux_x86_64.whl
pip install -r requirements.txt
pyinstaller --noconfirm --onefile --console --add-data libs:. --add-data assets:assets --add-data static:static --add-data templates:templates --name easy-local-alpr-$VERSION-openvinocpu_linux_x86_64 "alpr_api.py"
deactivate
rm -rf buildenv

View File

@ -155,6 +155,8 @@ mv "$BIN_DIR/dist/"*.whl "$BUILD_DIR"
mv "$BIN_DIR/libs" "$BUILD_DIR"
mv "$BIN_DIR/plugins.xml" "$BUILD_DIR/libs"
strip "$BUILD_DIR/libs"/*.so*
# Move the assets to the root directory
mv "$SDK_DIR/assets" "$BUILD_DIR/assets"

View File

@ -1,3 +1,3 @@
flask
pillow
Pillow
ultimateAlprSdk