2021-06-02 07:45:40 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
if [[ -z $1 ]] && [[ -z $2 ]]; then
|
|
|
|
echo "Please define architecture and variant (cpu/avx2/...)" 1>&2
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo "Downloading tensorflow library..."
|
|
|
|
if [[ $1 == "amd64" ]]; then
|
|
|
|
TARGETARCH="linux"
|
|
|
|
TARGETVARIANT="-${2:-"cpu"}"
|
2021-12-12 20:15:52 +01:00
|
|
|
URL="https://dl.photoprism.app/tensorflow/$TARGETARCH/libtensorflow-${TARGETARCH}${TARGETVARIANT}-1.15.2.tar.gz"
|
2021-06-02 07:45:40 +02:00
|
|
|
elif [[ $1 == "arm64" ]]; then
|
2021-12-12 20:15:52 +01:00
|
|
|
URL="https://dl.photoprism.app/tensorflow/$1/libtensorflow-$1-1.15.2.tar.gz"
|
2021-06-02 07:45:40 +02:00
|
|
|
elif [[ $1 == "arm" ]]; then
|
2021-12-12 20:15:52 +01:00
|
|
|
URL="https://dl.photoprism.app/tensorflow/$1/libtensorflow-$1-1.15.2.tar.gz"
|
2021-06-02 07:45:40 +02:00
|
|
|
else
|
|
|
|
echo "cpu architecture not supported by now" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo "$URL"
|
2021-09-29 09:01:57 +02:00
|
|
|
curl -fsSL "$URL" | \
|
|
|
|
tar --overwrite -C "/usr" -xz && \
|
2021-06-02 07:45:40 +02:00
|
|
|
ldconfig
|
|
|
|
echo "Done"
|
|
|
|
fi
|