Obtain a CUDA version:
cat /usr/local/cuda/version.txt
Obtain a cuDNN version:
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2