libXrender.so.1 error with docker

  File "run.py", line 4, in <module>
    from cv2 import cvtColor, COLOR_RGB2GRAY
  File "/srv/conda/lib/python3.6/site-packages/cv2/__init__.py", line 3, in <module>
    from .cv2 import *
ImportError: libXrender.so.1: cannot open shared object file: No such file or directory

The docker builds successfully, but when I run the agent, I get this error. I looked up this error, and it seems like this error has to be fixed by running sudo apt-get install -y libxrender-dev

Is there a way to get this line into docker build?

1 Like

We use repo2docker for building the submission images. You can check how to add your requirements and packages here: https://repo2docker.readthedocs.io/en/latest/config_files.html

@shivam hi I also encounter the same issue, but Iā€™m not familiar with repo2docker, could you specify which file I should modify in order to install libxrender?