Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

nvidia-docker v2: error while loading shared libraries: libEGL.so.1: cannot open shared object file #776

Closed
xsbreakaway opened this issue Jun 26, 2018 · 8 comments

Comments

@xsbreakaway
Copy link

There is an error when I run my image after updating the version of nvidia-docker to version 2.
error while loading shared libraries: libEGL.so.1: cannot open shared object file

I found that there are many shared libraries in path /usr/local/nvidia/lib64 of container when I use nvidia-docker v1.
image
But there is nothing of container when I use nvidia-docker v2 to run the same image.

I had tried the NVIDIA_DRIVER_CAPABILITIES environment variable.
image
But this is no help.

@flx42
Copy link
Member

flx42 commented Jun 26, 2018

In nvidia-docker v2, libEGL comes from libglvnd. Do ldconfig -p | grep libEGL to find its location.

@xsbreakaway
Copy link
Author

in container:
image
out container:
image
There is libEGL out container (path:/usr/lib64/nvidia/libEGL.so.1).

What should I do to mount libraries to container by nvidia-docker v2?

@flx42
Copy link
Member

flx42 commented Jun 27, 2018

You need to use an OpenGL image:
https://hub.docker.com/r/nvidia/opengl/

Or a CUDA + OpenGL image:
https://hub.docker.com/r/nvidia/cudagl/

@xsbreakaway
Copy link
Author

Thank you for reply.
You mean that I should change my base image?
I can run my image smoothly by nvidia-docker v1. Is there any way to mount libraries on container instead of changing my base image by nvidia-docker v2?

@flx42
Copy link
Member

flx42 commented Jun 27, 2018

No, you have to change the base image. Or, if your base image is Ubuntu 18.04, libglvnd is properly packaged so it's super-easy, you can look here:
#136 (comment)

You can also look at how we build our opengl base images for 18.04:
https://gitlab.com/nvidia/opengl/blob/ubuntu18.04/1.0-glvnd/runtime/Dockerfile
https://gitlab.com/nvidia/opengl/blob/ubuntu18.04/1.0-glvnd/devel/Dockerfile

@3XX0 3XX0 closed this as completed Jul 5, 2018
@den-is
Copy link

den-is commented Jul 20, 2019

@flx42 above links are dead :((

@RenaudWasTaken
Copy link
Contributor

https://gitlab.com/nvidia/cudagl

@srmocher
Copy link

I didn't have the option of changing the base image but was able to resolve this error by mounting the .so file from the host into the container.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants