Solved ImportError: libGL.so.1: cannot open shared object file: No such file or directory When using cv2 in Dockerfile. Adding library below to your Dockerfile to solve the issue : RUN apt-get update RUN apt-get install ffmpeg libsm6 libxext6 -y