I have an application which works fine ‘bare-metal’ on the Nano, but when I want to containerize it via Docker some dependencies (opencv & tensorrt) are not available.
My starting point is the l4t base image which I want to use to bring all thing I need up.
Furthermore I can see a tensorrt.csv file there, but TRT doesn’t work for either Python2.7 nor 3.6.
Nevertheless CUDA is available and when I try the .deviceQuery sample that seems to work fine
So my question basically is here how to get OpenCV running there and maybe a more detailed instruction how those .csv files should look like.
I am a beginner on containers. Aren’t we losing the whole charm of containers if we still have to mount libraries from the host? I know this saves image size, but then what will happen if I want to run the same container on another host (2) that does not have the libraries that exist on host(1)? Is this a reasonable question or am I missing some fundamentals?
I agree completely with your comments. Linking to host’s libraries seem to be a quick way to make it work (for nvidia), but it should be done the right way in the future. Did you have any luck with using tensorrt from inside a container? I’m still struggling with it.
yes it worked for me, but for Jetpack <= 4.3 I had to add the TensorRT Python library
(dir, /usr/lib/python3.6/dist-packages/tensorrt for Python3) to /etc/nvidia-container-runtime/host-files-for-container.d/tensorrt.csv
In Jetpack 4.4 both - Python2 and Python3 bindings were already there.
Yes, you are right, I remember not seeing the python binding in that csv in 4.3. Nonetheless, it hasn’t occurred to me to add it manually, probably because the whole csv part did not appear to be working already. I’m about ro reflash a 4.3 and will give it a try to 4.4 DP mabe later too. Good to hear you got it working, thank you.