Error installing pycuda on DriveOS 7.0.3 / AGX Drive Thor

DRIVE OS Version: 7.0.3

Issue Description:

Python miniconda venv (using python 3.13.12), running pip install pycuda fails with the following error:

  src/cpp/curand.hpp:6:12: fatal error: curand.h: No such file or directory
      6 |   #include <curand.h>

curand.h does not seem to be available (apt-file only finds it in package nvidia-cuda-dev which cannot be installed)

$ apt-cache policy nvidia-cuda-dev
nvidia-cuda-dev:
Installed: (none)
Candidate: (none)
Version table:

The target does not have header files. You can copy them from docker on need basis. Please check /usr/local/cuda-12.8/thor/targets/aarch64-linux/include/ folder .

Since some include files are in /usr/local/cuda-12.8/targets/ and other are in /usr/local/cuda-12.8/thor/targets/, what is the correct combination of env variables (CUDA_HOME, CPATH etc.) to be able to run pip install pycuda?

I will respond to myself - this seems to work

export CUDA_HOME=/usr/local/cuda-12.8
export CPATH=$CUDA_HOME/include:$CUDA_HOME/thor/include:$CPATH
export LIBRARY_PATH=$CUDA_HOME/lib64:$CUDA_HOME/thor/lib64:$LIBRARY_PATH
pip install pycuda

1 Like