I was trying to build pytorch 0.4.0 on my linux with cuda 9.1. However, after doing python setup.py install, I found that cudnn is not included given UserWarning: PyTorch was compiled without cuDNN support. To use cuDNN, rebuild PyTorch making sure the library is visible to the build system.
I did some check:

print(torch.backends.cudnn.version())
None
print(torch.cuda.is_available())
True

Further, in terminal

$CUDNN_LIB_DIR
-bash: /usr/local/cuda-9.1/lib64/: Is a directory
$CUDNN_INCLUDE_DIR
-bash: /usr/local/cuda-9.1/include/: Is a directory

Does anyone have some ideas on what I should do now?