mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-18 10:28:17 +01:00
Auto use tensorflow if cpu does not support AVX2
https://github.com/Nachtzuster/BirdNET-Pi/issues/251#issuecomment-2531452580
This commit is contained in:
12
birdnet-pi/rootfs/etc/cont-init.d/01-oldcpu.sh
Normal file
12
birdnet-pi/rootfs/etc/cont-init.d/01-oldcpu.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -e
|
||||
|
||||
# Compensate for old cpu without avx2
|
||||
if lscpu | grep -q avx2; then
|
||||
bashio::log.warning "NON SUPPORTED CPU DETECTED"
|
||||
bashio::log.warning "Your cpu doesn't support avx2, the analyzer service will likely won't work"
|
||||
bashio::log.warning "Trying to install tensorflow instead of tflite_runtime instead"
|
||||
$PYTHON_VIRTUAL_ENV pip3 uninstall -y tflite_runtime
|
||||
$PYTHON_VIRTUAL_ENV pip3 install tensorflow
|
||||
fi
|
||||
Reference in New Issue
Block a user