pytorch comes with it’s own CUDA and CuDNN files, so regardless of what’s on the cluster, the pytorch install will work.
If you so choose to want to compile pytorch with CuDNN6, you can compile from source.