Failed importing opencv in Docker image

Hello, I’m trying to use on my docker image and import cv2 module.

When running sudo docker run -it --rm --runtime nvidia --network host and run a python interpreter and import cv2 in it, it works well.
But when using l4t-ml image in docker image and importing cv2 module it throws -
ImportError: cannot open shared object file: No such file or directory

On bashrc I have -
export PATH="/usr/local/cuda-10.2/bin:$PATH"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.2/lib64/

and my dockerfile -

ENTRYPOINT [“python3”, “”]


Hi @tomerdayan168, are you also specifying --runtime nvidia when you start your own container that’s based off of l4t-ml?

1 Like