From a871ce5634b37376e7df4c6ff769dc2dad83b1d6 Mon Sep 17 00:00:00 2001 From: frederik Date: Sat, 4 Oct 2025 13:06:53 +0200 Subject: [PATCH] re-try pip install command, but purge the cache first --- scripts/install_birdnet.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/install_birdnet.sh b/scripts/install_birdnet.sh index 161ea56..16a97cb 100755 --- a/scripts/install_birdnet.sh +++ b/scripts/install_birdnet.sh @@ -31,7 +31,14 @@ install_birdnet() { source ./birdnet/bin/activate pip3 install wheel get_tf_whl - pip3 install -U -r ./requirements_custom.txt + LOOP_COUNT=2 + while ! pip3 install -U -r ./requirements_custom.txt + do + LOOP_COUNT=$(( LOOP_COUNT - 1 )) + pip3 cache purge + [ $LOOP_COUNT == 0 ] && exit 1 + sleep 5 + done } [ -d ${RECS_DIR} ] || mkdir -p ${RECS_DIR} &> /dev/null