hassio-addons / addon-appdaemon

AppDaemon4 - Home Assistant Community Add-ons
https://addons.community
MIT License
151 stars 47 forks source link

Unable to install tensorflow_runtime #229

Closed ianustec closed 1 year ago

ianustec commented 1 year ago

Problem/Motivation

I'm not able to install tensorflow_runtime

Expected behavior

use import tflite_runtime.interpreter as tflite module in app

Actual behavior

2023-01-22 13:35:40.065425 WARNING Error: ------------------------------------------------------------
2023-01-22 13:35:40.067667 WARNING Error: Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/appdaemon/app_management.py", line 770, in read_app
importlib.reload(self.modules[module_name])
KeyError: 'EntitiesLocator'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/appdaemon/app_management.py", line 993, in check_app_updates
await utils.run_in_executor(self, self.read_app, mod["name"], mod["reload"])
File "/usr/lib/python3.10/site-packages/appdaemon/utils.py", line 337, in run_in_executor
response = future.result()
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.10/site-packages/appdaemon/app_management.py", line 775, in read_app
self.read_app(file)
File "/usr/lib/python3.10/site-packages/appdaemon/app_management.py", line 784, in read_app
self.modules[module_name] = importlib.import_module(module_name)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/config/appdaemon/apps/EntitiesLocator/EntitiesLocator.py", line 11, in <module>
import tflite_runtime.interpreter as tflite
File "/usr/lib/python3.10/site-packages/tflite_runtime/interpreter.py", line 33, in <module>
from tflite_runtime import _pywrap_tensorflow_interpreter_wrapper as _interpreter_wrapper
ImportError: Error loading shared library ld-linux-aarch64.so.1: No such file or directory (needed by /usr/lib/python3.10/site-packages/tflite_runtime/_pywrap_tensorflow_interpreter_wrapper.so)
2023-01-22 13:35:40.068284 WARNING Error: ------------------------------------------------------------

Steps to reproduce

This is the only package combination that will complete the installation process but then tf_lite fails

init_commands:
- >-
wget --no-check-certificate
https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk
- >-
wget --no-check-certificate
https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-bin-2.35-r0.apk
- apk add --no-cache --allow-untrusted glibc-2.35-r0.apk
- apk add --no-cache --allow-untrusted glibc-bin-2.35-r0.apk
python_packages:
- setuptools
- numpy==1.23.4
- >-
https://github.com/PINTO0309/TensorflowLite-bin/releases/download/v2.11.0/tflite_runtime-2.11.0-cp310-none-linux_aarch64.whl
- Pillow
- shapely
system_packages:
- libc6-compat
- py3-setuptools
- swig
- libjpeg
- libjpeg-turbo-dev
- zlib
- zlib-dev
- python3-dev
- unzip
- wget
- curl
- git
- cmake
- make
log_level: info

Proposed changes

(If you have a proposed change, workaround or fix, describe the rationale behind it)

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!