Thanks for the answer! I had a little misconception when I asked this question. I didn’t know that PyTorch (the binary installers via conda and pip wheels) already ship the necessary CUDA and cuDNN parts.
For some reason, PyTorch did not detect cuda via “torch.cuda.is_available” first. When I tried with a fresh OS install (via Amazon AWS EC2), I noticed that even though I had the correct NVIDIA drivers for the given graphics card installed, it wouldn’t work. What fixed the problem was downloading CUDA 9.0 and running the installer without installing CUDA itself (during the installation, it asks you to install the NVIDIA display driver, which I answered with “yes” and the CUDA 9.0 toolkit, which I answered with “no”). After installing the graphics card drivers through the CUDA installer, it all worked fine (even without CUDA installed as PyTorch already comes with it).