placing installation in venv
This commit is contained in:
@@ -412,7 +412,7 @@ SYSTEMD_MOUNT=$(echo ${RECS_DIR#/} | tr / -).mount
|
|||||||
## VENV is the virtual environment where the the BirdNET python build is found,
|
## VENV is the virtual environment where the the BirdNET python build is found,
|
||||||
## i.e, VENV is the virtual environment miniforge built for BirdNET.
|
## i.e, VENV is the virtual environment miniforge built for BirdNET.
|
||||||
|
|
||||||
VENV=${my_dir}/miniforge/envs/birdnet
|
VENV=${my_dir}/birdnet
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#---------------------------------- Testing -----------------------------------#
|
#---------------------------------- Testing -----------------------------------#
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ run_analysis() {
|
|||||||
--overlap "${OVERLAP}" \
|
--overlap "${OVERLAP}" \
|
||||||
--sensitivity "${SENSITIVITY}" \
|
--sensitivity "${SENSITIVITY}" \
|
||||||
--min_conf "${CONFIDENCE}""
|
--min_conf "${CONFIDENCE}""
|
||||||
python3 analyze.py \
|
"${VENV}"/bin/python analyze.py \
|
||||||
--i "${1}/${i}" \
|
--i "${1}/${i}" \
|
||||||
--o "${1}/${i}.csv" \
|
--o "${1}/${i}.csv" \
|
||||||
--lat "${LATITUDE}" \
|
--lat "${LATITUDE}" \
|
||||||
@@ -128,7 +128,7 @@ run_analysis() {
|
|||||||
--sensitivity "${SENSITIVITY}" \
|
--sensitivity "${SENSITIVITY}" \
|
||||||
--min_conf "${CONFIDENCE}" \
|
--min_conf "${CONFIDENCE}" \
|
||||||
--custom_list "${CUSTOM_LIST}""
|
--custom_list "${CUSTOM_LIST}""
|
||||||
python3 analyze.py \
|
"${VENV}"/bin/python analyze.py \
|
||||||
--i "${1}/${i}" \
|
--i "${1}/${i}" \
|
||||||
--o "${1}/${i}.csv" \
|
--o "${1}/${i}.csv" \
|
||||||
--lat "${LATITUDE}" \
|
--lat "${LATITUDE}" \
|
||||||
|
|||||||
@@ -47,8 +47,11 @@ install_deps() {
|
|||||||
|
|
||||||
install_birdnet() {
|
install_birdnet() {
|
||||||
cd ~/BirdNET-Pi || exit 1
|
cd ~/BirdNET-Pi || exit 1
|
||||||
|
echo "Establishing a python virtual environment"
|
||||||
|
python3 -m venv birdnet
|
||||||
|
source ./birdnet/bin/activate
|
||||||
echo "Upgrading pip, wheel, and setuptools"
|
echo "Upgrading pip, wheel, and setuptools"
|
||||||
sudo pip3 install --upgrade pip wheel setuptools
|
pip3 install --upgrade pip wheel setuptools
|
||||||
if [ ! -f $(dirname ${my_dir})/tflite_runtime-2.6.0-cp37-none-linux_aarch64.whl ];then
|
if [ ! -f $(dirname ${my_dir})/tflite_runtime-2.6.0-cp37-none-linux_aarch64.whl ];then
|
||||||
echo "Fetching the TFLite pre-built binaries"
|
echo "Fetching the TFLite pre-built binaries"
|
||||||
TFLITE_URL="https://drive.google.com/uc?export=download&id=1dlEbugFDJXs-YDBCUC6WjADVtIttWxZA"
|
TFLITE_URL="https://drive.google.com/uc?export=download&id=1dlEbugFDJXs-YDBCUC6WjADVtIttWxZA"
|
||||||
@@ -58,13 +61,13 @@ install_birdnet() {
|
|||||||
curl -Lb /tmp/cookie ${TF_COOKIE} -o tflite_runtime-2.6.0-cp37-none-linux_aarch64.whl
|
curl -Lb /tmp/cookie ${TF_COOKIE} -o tflite_runtime-2.6.0-cp37-none-linux_aarch64.whl
|
||||||
fi
|
fi
|
||||||
echo "Installing the TFLite bin wheel"
|
echo "Installing the TFLite bin wheel"
|
||||||
sudo pip3 install --upgrade tflite_runtime-2.6.0-cp37-none-linux_aarch64.whl
|
pip3 install --upgrade tflite_runtime-2.6.0-cp37-none-linux_aarch64.whl
|
||||||
echo "Installing colorama==0.4.4"
|
echo "Installing colorama==0.4.4"
|
||||||
sudo pip3 install colorama==0.4.4
|
pip3 install colorama==0.4.4
|
||||||
echo "Installing librosa"
|
echo "Installing librosa"
|
||||||
sudo pip3 install librosa
|
pip3 install librosa
|
||||||
echo "Installing mysql-connector-python"
|
echo "Installing mysql-connector-python"
|
||||||
sudo pip3 install mysql-connector-python
|
pip3 install mysql-connector-python
|
||||||
}
|
}
|
||||||
|
|
||||||
read -sp "\
|
read -sp "\
|
||||||
|
|||||||
@@ -435,7 +435,7 @@ SYSTEMD_MOUNT=$(echo ${RECS_DIR#/} | tr / -).mount
|
|||||||
## VENV is the virtual environment where the the BirdNET python build is found,
|
## VENV is the virtual environment where the the BirdNET python build is found,
|
||||||
## i.e, VENV is the virtual environment miniforge built for BirdNET.
|
## i.e, VENV is the virtual environment miniforge built for BirdNET.
|
||||||
|
|
||||||
VENV=$(dirname ${my_dir})/miniforge/envs/birdnet
|
VENV=$(dirname ${my_dir})/birdnet
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#---------------------------------- Testing -----------------------------------#
|
#---------------------------------- Testing -----------------------------------#
|
||||||
|
|||||||
Reference in New Issue
Block a user