Thanks for the information.
The CUDA version given by nvcc won’t be used, as PyTorch binaries ship with their own CUDA and cudnn libs.
Do you necessarily need this old PyTorch version (0.4.1) or could you try to install the latest stable version (1.2.0) with CUDA9.2 or CUDA10?