2
votes

I am using a AWS Lambda and storing ML model in docker container. In my model i am using easyocr library which apparently requires a writeable file system. So i am trying to store easyocr in /tmp directory. I am able to import libraries from /tmp using - import sys sys.path.append('/tmp/lib/python3.7/site-packages/') While it is working fine with other libraries but with easyocr it generates the following error.

enter image description here

I have tried updating LD_LIBRARY_PATH env variable as well but still it is not working. Any idea why?

1
Do you have libgl1-mesa-glx installed?Nazkter

1 Answers

2
votes

It seems that library easyocr was found, but it can't import libGL.so.1.

If you can access the Docker (debian and derivatives):

sudo apt update
sudo apt install libgl1-mesa-glx

If you can access the Docker (amazon-linux 2):

yum install mesa-libGL

If you only have access to your dockerfile, then add this lines:

RUN apt-get update && \
    apt-get install libgl1-mesa-glx -y