test new install

This commit is contained in:
mcguirepr89
2022-02-17 17:28:32 -05:00
parent 5455a682cd
commit 3ec62479fb
4 changed files with 227 additions and 119 deletions
+10 -42
View File
@@ -20,27 +20,26 @@ fi
sudo ./install_services.sh || exit 1
source /etc/birdnet/birdnet.conf
APT_DEPS=(swig ffmpeg wget unzip curl cmake make bc)
LIBS_MODULES=(libjpeg-dev zlib1g-dev python3-dev python3-pip python3-venv)
apt_deps=(swig ffmpeg wget unzip curl cmake make bc)
libs_modules=(libjpeg-dev zlib1g-dev python3-dev python3-pip python3-venv)
install_deps() {
echo " Checking dependencies"
sudo apt update &> /dev/null
for i in "${LIBS_MODULES[@]}";do
echo "Checking dependencies"
for i in "${libs_modules[@]}";do
if [ $(apt list --installed 2>/dev/null | grep "$i" | wc -l) -le 0 ];then
echo " Installing $i"
sudo apt -y install ${i} &> /dev/null
else
echo " $i is installed!"
echo "$i is installed!"
fi
done
for i in "${APT_DEPS[@]}";do
for i in "${apt_deps[@]}";do
if ! which $i &>/dev/null ;then
echo " Installing $i"
echo "Installing $i"
sudo apt -y install ${i} &> /dev/null
else
echo " $i is installed!"
echo "$i is installed!"
fi
done
}
@@ -51,21 +50,10 @@ install_birdnet() {
python3 -m venv birdnet
source ./birdnet/bin/activate
echo "Upgrading pip, wheel, and setuptools"
pip3 install --upgrade pip~=21.0.0 wheel setuptools
python_version="$(awk -F. '{print $2}' <(ls -l $(which /usr/bin/python3)))"
echo "python_version=${python_version}"
pip3 install --upgrade pip wheel setuptools
# TFLite Pre-built binaires from https://github.com/PINTO0309/TensorflowLite-bin
# Python 3.7
if [[ "$python_version" == 7 ]];then
echo "Installing the TFLite bin wheel"
pip3 install --upgrade tflite_runtime-2.6.0-cp37-none-linux_aarch64.whl
fi
# Python 3.9
if [[ "$python_version" == 9 ]];then
echo "Installing the TFLite bin wheel"
pip3 install --upgrade tflite_runtime-2.6.0-cp39-none-linux_aarch64.whl
fi
echo "Making sure everything else is installed"
pip3 install -U -r /home/pi/BirdNET-Pi/requirements.txt
}
@@ -76,24 +64,4 @@ install_deps
if [ ! -d ${VENV} ];then
install_birdnet
fi
echo " BirdNet is installed!!
To start the service manually, issue:
'sudo systemctl start birdnet_analysis'
To monitor the service logs, issue:
'journalctl -fu birdnet_analysis'
To stop the service manually, issue:
'sudo systemctl stop birdnet_analysis'
To stop and disable the service, issue:
'sudo systemctl disable --now birdnet_analysis.service'
Visit
the BirdNET-Pi homepage at http://birdnetpi.local"
echo
case $YN in
[Yy] ) sudo systemctl start birdnet_analysis.service \
&& journalctl -fu birdnet_analysis;;
* ) echo " Thanks for installing BirdNET-Pi!!
I hope it was helpful!";;
esac
exit 0