Difficulty installing flownet-2 custom layers; need nvidia-cuda-toolkit version 10.0?


I am trying to install the custom layers needed to run this repo, which I believe come directly from the NVIDIA flownet2 implementation. When I go through the install process described, the compilation of the custom layers fails. The last few lines of the ouput are

/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^ 
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^ 
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
error: command '/usr/bin/nvcc' failed with exit code 1

Looking through the Github issues of the NVIDIA flownet2 implementation (I would link to it but am restricted to a single link per post as a new user), this issue seems to arise from using the wrong version of nvidia-cuda-toolkit. Specifically, I think I should be using version 10.0 (as the conda environment in the first repo tries to setup), but running nvcc --version on my machine gives

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0

Is there a way to install the correct version using apt? Running sudo apt install nvidia-cuda-toolkit=10.0 gives an error

Package nvidia-cuda-toolkit is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Version '10.0' for 'nvidia-cuda-toolkit' was not found

Alternatively, if anyone else has ideas about what might be causing this to fail, your assistance would be greatly appreciated. Thanks!