EDIT: I managed to install pytorch from source using only environment modules. One obviously needs to load the same environment modules again before using torch, but also during installation one has to set CUDNN_ROOT to point to the cudnn folder containing “include” and “lib64”. Maybe this variable should be added to the setup.py?