I think that requirements.txt needs to include numpy. While starting coral-app.py inside a container with only Flask and Pillow installed I note that something in the edgetpu library has a dependency on it:
root@8d34eb5617d9:/home/pi# python coral-app.py
ImportError: numpy.core.multiarray failed to import
Traceback (most recent call last):
File "coral-app.py", line 6, in <module>
from edgetpu.detection.engine import DetectionEngine
File "/usr/local/lib/python3.6/site-packages/edgetpu/detection/engine.py", line 17, in <module>
from edgetpu.basic.basic_engine import BasicEngine
File "/usr/local/lib/python3.6/site-packages/edgetpu/basic/basic_engine.py", line 17, in <module>
from edgetpu.swig.edgetpu_cpp_wrapper import BasicEnginePythonWrapper
File "/usr/local/lib/python3.6/site-packages/edgetpu/swig/edgetpu_cpp_wrapper.py", line 28, in <module>
_edgetpu_cpp_wrapper = swig_import_helper()
File "/usr/local/lib/python3.6/site-packages/edgetpu/swig/edgetpu_cpp_wrapper.py", line 24, in swig_import_helper
_mod = imp.load_module('_edgetpu_cpp_wrapper', fp, pathname, description)
File "/usr/local/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/usr/local/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: numpy.core.multiarray failed to import
Adding that back to requirements.txt resolves this problem.
I think that requirements.txt needs to include numpy. While starting coral-app.py inside a container with only Flask and Pillow installed I note that something in the edgetpu library has a dependency on it:
Adding that back to
requirements.txt
resolves this problem.