Libtorch caffe2 cannot find CuDNN

I am trying to use the pytorch C++ frontend API and downloaded libtorch to /usr/local which is also where i have installed cuda-11.0.

I then downloaded the lubcudnn8 deb file and installed it. Ubuntu installed the cudnn library to /usr/lib/x86_64-linux-gnu

Now when i try to compile the example cmake file i get the following error:
[cmake] – Could NOT find CUDNN (missing: CUDNN_LIBRARY_PATH CUDNN_INCLUDE_PATH)
[cmake] CMake Warning at /usr/local/libtorch/share/cmake/Caffe2/public/cuda.cmake:109 (message):

looking in the libtorch cuda.cmake file I can see that the command “find_package(CUDNN)” cannot find the cudnn library

So my best guess is that i should have saved the CUDNN library to usr/local, but I thought any library saved to /usr/lib/x86_64-linux-gnu is globally visible.

This is where I reach the edge of my C++ linking/CMake Find Package/Ubuntu knowledge.

Can anybody please point me in the direction of how i can solve this issue. it seems like i just need to make my CUDNN globally visible/or move the CUDNN files somewhere else, or tell libtoch where to look, but not sure what the best option is and how to do it.
any help would be greatly appreciated

I had only downloaded the Runtime Library, when I also downloaded the Developer Library and the Code Samples deb files and above error went away