Tensorflow installation issue in WSL2

I have been trying to install Tensorflow 2.16.1 with GPU support on a WSL in Windows 11. My Linux installation is Ubuntu. I have been following the instructions here. The process requires me to install cudnn 8.6.0 which I am trying to download from here. I have downloaded the archive (Local installer for Ubuntu22.04 x86_64 (Deb)) for cuda 11.x in Windows, mounted the download location in WSL and tried to run the script file from the bash prompt.
However, on doing this I immediately get an error “syntax error near unexpected token newline”, and the installation aborts.
Can someone help me in overcoming this issue. Secondly can I install cudnn 8.6 using conda itself? If so I would like to know about it.

@Abhijit_Mustafi please check if the solution presented here helps you.