Want to install pytorch for custom cuda version (cuda =11.2)

I am looking for a guide to install Pytorch successfully , I have a system where I use cuda toolkit == 11.2.2 for tensorflow , but now I want to install pytorch for same version of cuda which is 11.2.2 ,
I just want to keep my installations minimum and don’t wan’t to install different cuda versions for pytorch and tensorflow.

so please help me installing pytorch capable to run on gpu without reinstalling any new cuda libraries

You could build PyTorch from source as described here using your locally installed CUDA 11.2 toolkit.