photoprism/scripts/dist/tensorflow-driver.sh
Michael Mayer fab00ec6e0 CI: Change headers in scripts/dist
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-07-23 13:16:10 +02:00

11 lines
No EOL
354 B
Bash
Executable file

#!/usr/bin/env bash
PATH="/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/scripts:$PATH"
CPU_DETECTED=$(lshw -c processor -json 2>/dev/null)
if [[ $(echo "${CPU_DETECTED}" | jq -r '.[].capabilities.avx2') == "true" ]]; then
echo "avx2"
elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[].capabilities.avx') == "true" ]]; then
echo "avx"
fi