From eea7900b13098d264d4a7e96b978d17d49dafe31 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 30 Mar 2022 16:02:50 -0400 Subject: [PATCH] Update photoprism-install.sh --- setup/photoprism-install.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index db077120..08596b5c 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash - set -o errexit set -o errtrace set -o nounset @@ -81,9 +80,20 @@ ln -s /usr/local/go/bin/go /usr/local/bin/go &>/dev/null echo -e "${CM}${CL} \r" echo -en "${GN} Installing Tensorflow... " -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 -ldconfig &>/dev/null +AVX=$(grep -o -m1 'avx[^ ]*' /proc/cpuinfo) +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 + ldconfig &>/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 + ldconfig &>/dev/null + else + 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 + ldconfig &>/dev/null +fi echo -e "${CM}${CL} \r" echo -en "${GN} Cloning PhotoPrism... "