Running a docker image but its throwing an error

I have created a docker image and getting the following error while running on a aws machine.

Could not load library Error: cannot open shared object file: No such file or directory
Please make sure is in your library path!

As a solution I had inserted the following line in the docker file:
RUN export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.0/targets/x86_64-linux/lib/

But am still getting the same error. If anyone could help me it would be great.

Export will not help in the image. That variable will only exist in that layer created by the RUN instruction which does not make sense. Try this:

ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.0/targets/x86_64-linux/lib/

Also make sure that the path exists and you installed the necessary libraries

“installing the necessary libraries” means…, insertion of following lines into the docker file will do ?

sudo mv /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys${last_public_key}.pub
sudo add-apt-repository "deb /"
sudo apt-get update
sudo apt-get install libcudnn8
sudo apt-get install libcudnn8-dev

If I knew what were the necessary libraries, I would have just told you that :slight_smile: The only thing I saw was the error message. If you those files are not even there, setting environment variables can’t help. Since I rarely use GPU with Docker and I have never seen that error message, this is all I could tell. You wrote days ago. I hope you could find a solution since then.