These are the things I did to get NVIDIA GeForce GTX 1050 Ti working on Ubuntu 24. Given its an older GPU card,
I had to use a lower CUDA version and a lower gcc version. Your system may be different. Don't try and figure it out yourself.
Easier to use claude CLI and debug together:
IMPORTANT: Don't copy paste - find out your GPU specs, and then download the right nvidia driver/CUDA/CuDNN/
wget https://developer.download.nvidia.com/compute/nvidia-driver/590.48.01/local_installers/nvidia-driver-local-repo-ubuntu2404-590.48.01_1.0-1_amd64.deb
sudo dpkg -i nvidia-driver-local-repo-ubuntu2404-590.48.01_1.0-1_amd64.deb
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run