From 28a714a4f70823c533fb5e40a375eafe85fd588e Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 7 May 2022 11:36:44 -0400 Subject: [PATCH] Update photoprism-install.sh --- setup/photoprism-install.sh | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 2375721a..1c699738 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -100,14 +100,29 @@ cp /root/go/bin/* /usr/local/go/bin/ cp /root/go/bin/* /usr/local/bin/ msg_ok "Installed Golang" +read -p "Check For Advanced Vector Extensions? " -n 1 -r +echo +if [[ $REPLY =~ ^[Yy]$ ]] +then + check=yes +else + check=no +fi + msg_info "Installing Tensorflow" -if [[ "$AVX" == "avx2" ]]; then - wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx2-1.15.2.tar.gz &>/dev/null - tar -C /usr/local -xzf libtensorflow-linux-avx2-1.15.2.tar.gz &>/dev/null - elif [[ "$AVX" == "avx" ]]; then - wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx-1.15.2.tar.gz &>/dev/null - tar -C /usr/local -xzf libtensorflow-linux-avx-1.15.2.tar.gz &>/dev/null - elif [[ "$AVX" == " " ]]; then +if [ "$check" == "yes" ]; then + if [[ "$AVX" == "avx2" ]]; then + wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx2-1.15.2.tar.gz &>/dev/null + tar -C /usr/local -xzf libtensorflow-linux-avx2-1.15.2.tar.gz &>/dev/null + elif [[ "$AVX" == "avx" ]]; then + wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-avx-1.15.2.tar.gz &>/dev/null + tar -C /usr/local -xzf libtensorflow-linux-avx-1.15.2.tar.gz &>/dev/null + elif [[ "$AVX" == " " ]]; then + wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-cpu-1.15.2.tar.gz &>/dev/null + tar -C /usr/local -xzf libtensorflow-linux-cpu-1.15.2.tar.gz &>/dev/null + fi +fi +if [ "$check" == "no" ]; then wget https://dl.photoprism.org/tensorflow/linux/libtensorflow-linux-cpu-1.15.2.tar.gz &>/dev/null tar -C /usr/local -xzf libtensorflow-linux-cpu-1.15.2.tar.gz &>/dev/null fi