The PyTorch binaries will not install a complete CUDA and cudnn library on your system.
I’m not familiar with the build process of PyTorch, but e.g. if you’ve used conda to install it, you’ll find the torchlib.so in ~/anaconda3/envs/YOUR_ENV_NAME/lib/python.3.7/site-packages/torch.
Running ldd on it gives:
	libcudart.so.10.0 => ...
        ...
	libcusparse.so.10.0 => ...
	libcurand.so.10.0 => ...
	libcufft.so.10.0 => ...

I’m not sure, if cudnn is linked in libcudart.so or separately.
That being said, if you would like to build other libraries with CUDA (using nvcc), you should install CUDA (and cudnn) directly on your system as @JuanFMontesinos said.
If possible, try to use the same CUDA version which is used in your PyTorch install, as this might avoid some incompatibility issues.