Install latest Nvidia driver -- 525 is CUDA 12-era, but is backwards-compatible with 11.8:
apt install nvidia-driver-525 nvidia-dkms-525
Install CUDA 11.8 (use the runfile install, tell it not to replace your driver if you have a newer driver, switch to gcc 11):
https://developer.nvidia.com/cuda-11-8-0-download-archive
Install cuDNN 8 (requires registration):