Merge pull request #44 from you-win/feature/pyinstaller-script-linux-and-osx
Add make_exe.sh for Linux and Mac
This commit is contained in:
commit
dc65454cb4
1 changed files with 30 additions and 0 deletions
30
make_exe.sh
Executable file
30
make_exe.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PYTHON_BINARY=$(which python3)
|
||||||
|
|
||||||
|
if [[ -z "$PYTHON_BINARY" ]]; then
|
||||||
|
echo "python3 not found. Searching for python instead."
|
||||||
|
PYTHON_BINARY=$(which python)
|
||||||
|
if [[ -z "$PYTHON_BINARY" ]]; then
|
||||||
|
echo "Python 3 must be available on your path. Exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Creating venv"
|
||||||
|
|
||||||
|
"$PYTHON_BINARY" -m venv venv
|
||||||
|
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
|
echo "Installing packages"
|
||||||
|
|
||||||
|
pip install onnxruntime opencv-python==4.5.4.60 pillow numpy pyinstaller
|
||||||
|
|
||||||
|
echo "Creating binary"
|
||||||
|
|
||||||
|
pyinstaller --clean facetracker.py
|
||||||
|
|
||||||
|
echo "Files should be available in the dist/ folder"
|
||||||
|
echo "Done!"
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue