Anyone had luck installing Detectron2 on a TX2 (Jetpack 4.2)?

I am trying to install Facebook’s Detectron2 framework on a TX2 board, which has latest Jetpack 4.2.

I managed to install pytorch 1.4.0 with instructions from this post

But I am having trouble installing/building detectron2, using the instructions on build from source in https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md

Anyone have a recipe to install Detectron2?

The error I get is

             from <command-line>:                                                                                                            

/usr/local/cuda-10.0/include/crt/host_config.h:129:2: error: #error – unsupported GNU version! gcc versions later than 7 are not supported!
#error – unsupported GNU version! gcc versions later than 7 are not supported!
^~~~~
error: command ‘/usr/local/cuda-10.0/bin/nvcc’ failed with exit status 1

I found this scary looking suggestion to install gcc v 7 just for nvcc to use

But I have to think there must be a better solution ??

I ‘downgraded’ to gcc 7 by changing the symlinks in /usr/bin

cd /usr/bin
mv g++ orig.g++
ln -s aarch64-linux-gnu-g++-7 g++
mv gcc orig.gcc
ln -s aarch64-linux-gnu-gcc-7 gcc

Maybe you can flash the higher JetPack version and try again.