-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_all.sh
executable file
·36 lines (33 loc) · 975 Bytes
/
build_all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
set -e
set -o pipefail
trap 'echo "An error occurred. Exiting..."; exit 1;' ERR
if [ -z "${app_certificate}" ]; then
echo "Error: Environment variable app_certificate is not set."
exit 1 # Exit with a non-zero value to indicate an error
fi
# Baseline utilities to build package
rm -rf ./venv || true
python3 -m venv venv
source venv/bin/activate
pip install setuptools wheel
# Build it
cd ./dynaface-lib
python3 setup.py bdist_wheel
mkdir -p ../dynaface-app/wheels/
cp ./dist/*.whl ../dynaface-app/wheels/
cd ../dynaface-app
cp $models/onet.pt ./data
cp $models/pnet.pt ./data
cp $models/rnet.pt ./data
cp $models/spiga_wflw.pt ./data
rm -rf ./venv || true
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt -f /Users/jeff/output/pytorch
pip install facial_analysis -f ./wheels -f /Users/jeff/output/PyTorch
cd deploy/macos
rm -rf ./working || true
./build.sh
echo "Build of library/app executed successfully."
exit 0