I solved the problem like this:
I went to the folder that contained nccl.h on my device.
Then, i wrote a single line that copies all .h extension files from that folder to a place I desire
Then I adapt this command to send all these .h to the problematic folder /home/nvidia/pytorch/torch/lib/c10d/…/c10d/
something like
$sudo -s
$cp /path/to/files{file1.h, nccl.h, file3.h, …} /home/nvidia/pytorch/torch/lib/c10d/…/c10d/
Then, I copy the command above and restart the installation.
Then, when it reaches close to 98% (maybe 96, maybe 97) I open a second terminal and paste the command and hit enter. Then, until the installation of the other terminal ends, I keep hitting Up-Arrow and enter every time a new line comes up on the installation. It gets stuck on 98%, then on 99% and even on 100%!
Apparently, the routine that is managing the installation does not recognize our .h files, and so, everytime we re-run the installation, it redefines the paths to the folder of these .h files. Besides that, the same installation refreshes the annoying folder that we are populating with these .h, go figure.
I did it exhaustively and finished it with success.
Tip: Do not attempt to import torch on python after installation if you forget to leave pytorch’s directory, it will not work. Do a cd … before.
Good luck!