Desperate for help getting Cuda to work on WSL2

I am unable to get Cuda to work on my WSL2. My end goal is to run train and run gpu-accelerated ML models on WSL2. I’ve “started from scratch” so many times, I’ve lost count. Here is some background info:

  1. I have a 2080Ti with an AMD 3900x on an X570 motherboard.
  2. I can’t get on the dev channel of Windows Insider for some reason. Release Preview is the only available channel for me as my PC is deemed to not meet requirements for Windows 11 - is this a dealbreaker?
  3. My WSL2 is Ubuntu 20.04 and the latest kernel.
  4. I downloaded the latest driver from CUDA on WSL | NVIDIA Developer and install it in Windows.
  5. Then from Ubuntu, after updating base libraries with apt get update and upgrade, I wget
    and make sure I uncheck the NVIDIA driver and install the remaining components.
  6. Then I try to run the deviceQuery sample and it invariably fails.
  7. Tensorflow 2.0+ is also not able to list my GPU in the list of available GPUs.

I’ve also tried following the steps in CUDA on WSL :: CUDA Toolkit Documentation many times with the same result (unable to access GPU from WSL2).
All I can try at this point is to reinstall windows and hope that things magically will work - but that seems like the definition of insanity. Can someone please let me know if the steps I’ve taken should be different (different driver version, install methods etc)?

I’m feeling quite lost and would appreciate any help here. Happy to post exact error logs if needed.


Update: I figured out how to get on the Dev branch for Windows insider (Turned on TPM on the motherboard) and got on to Windows 11 (had no option to stay on Windows 10, sadly). Now I’m able to find the GPU on Tensorflow!