improve setup script, reduce libs .so size (strip)
This commit is contained in:
parent
87e2d6dd7b
commit
59a54945ff
@ -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"
|
#!/bin/bash
|
||||||
# optional: --onefile
|
|
||||||
|
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
|
@ -155,6 +155,8 @@ mv "$BIN_DIR/dist/"*.whl "$BUILD_DIR"
|
|||||||
mv "$BIN_DIR/libs" "$BUILD_DIR"
|
mv "$BIN_DIR/libs" "$BUILD_DIR"
|
||||||
mv "$BIN_DIR/plugins.xml" "$BUILD_DIR/libs"
|
mv "$BIN_DIR/plugins.xml" "$BUILD_DIR/libs"
|
||||||
|
|
||||||
|
strip "$BUILD_DIR/libs"/*.so*
|
||||||
|
|
||||||
# Move the assets to the root directory
|
# Move the assets to the root directory
|
||||||
mv "$SDK_DIR/assets" "$BUILD_DIR/assets"
|
mv "$SDK_DIR/assets" "$BUILD_DIR/assets"
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
flask
|
flask
|
||||||
pillow
|
Pillow
|
||||||
ultimateAlprSdk
|
ultimateAlprSdk
|
Loading…
Reference in New Issue
Block a user