ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The current Docker containers do not support CUDA for cross-compilation. Doing so would require a pretty significant effort as the cross-compilation images are somewhat complex. We use an alpine image to bootstrap the creation of a "native" (using binfmt) arm64 image where all of the dependencies are installed. We then build an amd64 image on Ubuntu and copy all necessary environment from the intermediate arm64 image to /sysroot/generic-aarch64 in the amd64 environment. So, basically, you would have to do the following:

  1. Add another Dockerfile which uses the same process as the existing cross-compilation setup.
  2. Have that new Dockerfile install CUDA in the intermediate arm64 environment.
  3. Copy all of the CUDA components from the arm64 environment into /sysroot/generic-aarch64/ in the amd64 environment.
  4. Modify any scripts or CMake files which look for CUDA (such as the FindCuda.cmake file you mention above) to look in /sysroot/generic-aarch64/usr/local/cuda instead of /usr/local/cuda.

Unfortunately, the community hasn't shown enough interest thus far in a cross-compilation-supporting-CUDA image for anyone to make the effort. However, if you're willing to give it a shot, I'm happy to put in a bit of time to help.