Reputation: 33
I have a web app that I am trying to deploy to azure. After fixing various issues I am stuck with as pasted below.
I am using python 3.7 and I have windows 10. Trying to deploy a flask app with multiple computer vision models. I created a virtual env via the azure cli, installed my requiremnts.txt and then deployed it. It does deploy successfully but when I checkout the website it says "Application Error. The below is what I see when I check the logs. So far I have tried somewhat what I found over here but a solution is still unreachable:
https://github.com/business-science/modeltime.gluonts/issues/32
Could torch fix this issue? Just wondering.
2021-12-01T10:47:07.975121283Z Traceback (most recent call last):
2021-12-01T10:47:07.975390586Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-12-01T10:47:07.975445787Z worker.init_process()
2021-12-01T10:47:07.975466487Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/workers/base.py", line 134, in init_process
2021-12-01T10:47:07.975473287Z self.load_wsgi()
2021-12-01T10:47:07.975478588Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-12-01T10:47:07.975484588Z self.wsgi = self.app.wsgi()
2021-12-01T10:47:07.975489588Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-12-01T10:47:07.975495488Z self.callable = self.load()
2021-12-01T10:47:07.975665490Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-12-01T10:47:07.975673090Z return self.load_wsgiapp()
2021-12-01T10:47:07.975678990Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-12-01T10:47:07.975686090Z return util.import_app(self.app_uri)
2021-12-01T10:47:07.975691690Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/util.py", line 359, in import_app
2021-12-01T10:47:07.975698190Z mod = importlib.import_module(module)
2021-12-01T10:47:07.975704290Z File "/opt/python/3.7.9/lib/python3.7/importlib/__init__.py", line 127, in import_module
2021-12-01T10:47:07.975778791Z return _bootstrap._gcd_import(name[level:], package, level)
2021-12-01T10:47:07.975785391Z File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
2021-12-01T10:47:07.975792491Z File "<frozen importlib._bootstrap>", line 983, in _find_and_load
2021-12-01T10:47:07.975798791Z File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
2021-12-01T10:47:07.975804591Z File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
2021-12-01T10:47:07.975810291Z File "<frozen importlib._bootstrap_external>", line 728, in exec_module
2021-12-01T10:47:07.975816592Z File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2021-12-01T10:47:07.975822592Z File "/tmp/8d9b4b3d8465f24/app.py", line 6, in <module>
2021-12-01T10:47:07.975828692Z import cv_ins
2021-12-01T10:47:07.975834792Z File "/tmp/8d9b4b3d8465f24/cv_ins.py", line 9, in <module>
2021-12-01T10:47:07.975840792Z import gluoncv
2021-12-01T10:47:07.975846292Z File "/tmp/8d9b4b3d8465f24/antenv/lib/python3.7/site-packages/gluoncv/__init__.py", line 16, in <module>
2021-12-01T10:47:07.975852292Z _require_mxnet_version('1.4.0', '2.0.0')
2021-12-01T10:47:07.975858292Z File "/tmp/8d9b4b3d8465f24/antenv/lib/python3.7/site-packages/gluoncv/check.py", line 6, in _require_mxnet_version
2021-12-01T10:47:07.975867092Z import mxnet as mx
2021-12-01T10:47:07.975882692Z File "/tmp/8d9b4b3d8465f24/antenv/lib/python3.7/site-packages/mxnet/__init__.py", line 23, in <module>
2021-12-01T10:47:07.975888892Z from .context import Context, current_context, cpu, gpu, cpu_pinned
2021-12-01T10:47:07.975894292Z File "/tmp/8d9b4b3d8465f24/antenv/lib/python3.7/site-packages/mxnet/context.py", line 23, in <module>
2021-12-01T10:47:07.975901293Z from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass
2021-12-01T10:47:07.975907193Z File "/tmp/8d9b4b3d8465f24/antenv/lib/python3.7/site-packages/mxnet/base.py", line 351, in <module>
2021-12-01T10:47:07.975912693Z _LIB = _load_lib()
2021-12-01T10:47:07.975917793Z File "/tmp/8d9b4b3d8465f24/antenv/lib/python3.7/site-packages/mxnet/base.py", line 342, in _load_lib
2021-12-01T10:47:07.975923593Z lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
2021-12-01T10:47:07.975929293Z File "/opt/python/3.7.9/lib/python3.7/ctypes/__init__.py", line 364, in __init__
2021-12-01T10:47:07.975935793Z self._handle = _dlopen(self._name, mode)
2021-12-01T10:47:07.975941293Z OSError: libgomp.so.1: cannot open shared object file: No such file or directory
My requirements.txt:
Flask==2.0.1
gluoncv==0.10.4.post1
imutils==0.5.4
ipywidgets==7.6.3
matplotlib==3.4.2
mxnet==1.7.0.post2
numpy
numpydoc
opencv-python==4.5.3.56
pandas==1.3.1
py==1.11.0
schedule==1.1.0
Werkzeug==2.0.1
zipp
Upvotes: 1
Views: 1838
Reputation: 1864
You can fix this OSError: libgomp.so.1: cannot open shared object file: No such file or directory
OSError by installing libgomp1
For Windows:
This error could be due to lack of not finding dependencies of OpenCV/gluoncv
You can refer to similar issue on Microsoft Q&A: OSError: libgomp.so.1: cannot open shared object file: No such file or directory
For Linux:
sudo apt-get install libgomp1
You can refer to libgomp.so.1: cannot open shared object file: No such file or directory
Upvotes: 1