Flask APP on Azure is giving import cv2 ImportError: libGL.so.1: after deployment
- In
requirements.txt
useopencv-python-headless==4.5.1.48
instead ofopencv-contrib-python==4.5.1.48
. - If the above method does not work, build a custom docker image on top of AML base images(i.e. mcr.microsoft.com/azureml/base-gpu:0.2.4) and include the mesa's GL library in conda using
conda_packages=['mesa-libgl-cos6-x86_64']
This is related to this ImportError: libSM.so.6: cannot open shared object file: No such file or directory