Which version of cuda and cuDNN is needed for NVIDIA Geforce GTX 960M with Ubuntu 16.04

Dear sir,
I have NVIDIA Geforce GTX 960M and ubuntu 16.04.I want to install cuda and cuDNN for caffe.Which version of cuda and cuDNN is supportable for my mentioned gpu.and how to install the cuda and cuDNN for caffe.I also want to install digits for caffe.How to install?Please help me.I would be gratefull.