I am having some issues with Pycuda installation, both 2019 and 2020 versions.
Jetson NX board Jetpack 32.4.2 with nvidia docker container and --runtime nvidia arg when running a docker container.
Tested Docker base images: nvcr.io/nvidia/l4t-base:r32.3.1 / FROM nvcr.io/nvidia/l4t-base:r32.4.4
Other installments: python3-pip, cmake and numpy_ringbuffer
For l4t-base:r32.3.1 :
PATH=/usr/local/cuda-10.0/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin LD_LIBRARY_PATH=/usr/local/cuda-10.0/targets/aarch64-linux/lib C_INCLUDE_PATH=/usr/local/cuda/targets/aarch64-linux/include LIBRARY_PATH=/usr/local/cuda/targets/aarch64-linux/lib Installed Pycuda with : pip3 install pycuda==2019.1.2 --no-cache-dir
This image has two versions of cuda, cuda 10.0 and cuda 10.2 installed by default and /usr/local/cuda points to cuda 10.0
The issue is the following: Installing pycuda with pip3 works fine, but when you run in python: import pycuda.autoinit it crashes with the following error: ImportError: libcurand.so.10.0: cannot open shared object file: No such file or directory
For l4t-base:r32.4.4 :
PATH=/usr/local/cuda-10.2/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin LD_LIBRARY_PATH=/usr/local/cuda-10.2/targets/aarch64-linux/lib C_INCLUDE_PATH=/usr/local/cuda-10.2/targets/aarch64-linux/include LIBRARY_PATH=/usr/local/cuda-10.2/targets/aarch64-linux/lib Installed Pycuda with : pip3 install pycuda==2019.1.2 --no-cache-dir
The issue here is the following:
/usr/local/cuda-10.2/include/cuda_runtime.h:83:10: fatal error: crt/host_config.h: No such file or directory #include "crt/host_config.h"
File cuda_runtime.h has include <crt/host_config.h> that is in /lib and no longer in crt folder, so it will not compile.
Tried a lot of different things but to no success. Any suggestions on how to solve this?
Added the Dockerfile that i use
Dockerfile (415 Bytes)
Run it with the following command:
sudo docker build --tag jetson_dimg . sudo docker run -it --rm --network host --runtime nvidia jetson_dimg:latest