NVIDIA Driver not installing correcly - google-cloud-platform

I am currently working on a Google Cloud environment with a Tesla T4 GPU type. I need to install an NVIDIA driver with it (which I did using the .run file). I downloaded the NVIDIA-Linux-x86_64-515.43.04.run file from the NVIDIA website. I also needed the CUDA Toolkit installer which I also downloaded as a .deb file into my Google Cloud instance (cuda-repo-debian11-11-7-local_11.7.0-515.43.04-1_amd64.deb).
I followed these instructions to finish installing CUDA: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Debian&target_version=11&target_type=deb_local. I also tried to follow these pre and post-installation steps to set up the driver: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#package-manager-overview.
I get some weird errors. For example when I run the nvidia-smi command in the Cloud cl I get this error: NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. I am confused since I'm pretty sure I downloaded the latest version.
I am a noob in python and GPU related things so I don't really know what I'm doing. Can someone help me install the NVIDIA driver onto my Google Cloud instance? Thanks!!

Related

Why is nvidia-smi not working on deep learning ami + aws g5.xlarge

I want to use tensorflow on aws g5.xlarge. For AMI, I used AWS Deep Learning AMI (Ubuntu 18.04) ver 50.0. But when I start the instance and try nvidia-smi, the following error exists. Why am I getting the following error even though I used deep learning ami?
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

google cloud vm cannot find GPU after restart

I created one google cloud vm with GPU. The GPU was working after instance created.
But after restarting the vm, the GPU was gone.
I ran nvidia-smi and got this error:
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
Who knows how to fix it? Thanks

Unable to install NVIDIA driver on various GCP Ubuntu VM's with Tesla K80 GPU

I have followed this GCP guide with Ubuntu 18 and 20 (have also tried Ubuntu Lite, Debian and Centos 7) but, unfortunately, after completing the lengthy install I get this:
me#gpu:~$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running
I have tried installing via the script and via the direct downloads from the Nvidia site for Cuda 10. Ready to pull my hair out if that helps! I don't understand how a company that builds a bazillion GPU's can't make the installation process robust?
I have also tried these recommendations with no luck.
I was able to get it working. The mistake I was making was not doing the pre-installation steps before running the cuda_10.1.243_418.87.00_linux.run script. I was under the impression the *.run file would do everything for me. It would help if users were told they MUST do the pre-installation steps. Specifically I had to do this for Ubuntu 18:
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
options nouveau modeset=0
sudo update-initramfs -u
reboot
This seems like a bit of a “hack”, so not sure why nvidia can’t make the installation process more robust? They make a bazillion of these cards. It’s not like some homemade product with a niche user base…
If you've installed the driver so many times and nvidia-smi is still failing to communicate, take a look into prime-select.
Run prime-select query, this way you are going to get all possible options, it should show at least nvidia | intel.
Select prime-select nvidia.
Then, if you see nvidia is already selected, choose a different one, e.g. prime-select intel. Next, switch back to nvidia prime-select nvidia
Reboot and check nvidia-smi.
Plus, it could be a good idea to run again:
sudo apt install nvidia-cuda-toolkit
When it finishes, reboot the machine, and nvidia-smi should work then.
Now, in other cases it works to follow these instructions to install CuDNn and Cuda on VMs cuda_11.2_installation_on_Ubuntu_20.04.
And finally, in some other cases it is caused by unattended-upgrades. Take a look into the settings and adjust them if it is causing unexpected results. This URL has the documentation for Debian, and I was able to see that you already tested with that distro UnattendedUpgrades.

How can I get Raspbian running in VirtualBox?

I'm trying to set up a Raspbian image in VirtualBox 6.1.14 for development. I downloaded the latest .iso from the RPi website, and set up a VirtualBox machine with the OS set to Debian (32-bit). When I mount the .iso and start the machine, I'm able to get through all the installation steps until it gets to the point of configuring the package manager--at that point it freezes in both the text installer and the GUI installer.
I've tried doing this with the network adapter enabled and disabled, which made no difference. Is there a specific configuration to the VM that will get the installation to work?
I am a dum dum. I needed to up the memory on the VM. Below are the pertinent stats for it to work.
OS: Debian (32-bit)
Base Memory: 1024mb
Video Memory: 128mb
Graphics Controller: VMSVGA
Storage: 8gb

How to add cuda drivers to gcp Ubuntu vm?

When I run a pytorch model on a google virtual machine using:
model.cuda()
I get this error:
AssertionError:
Found no NVIDIA driver on your system. Please check that you
have an NVIDIA GPU and installed a driver from
http://www.nvidia.com/Download/index.aspx
As of 2020-05-01, GCP default machines run 9.12. So it's hard to use the default repository :
ppa:graphics-drivers
I recommend just downloading the driver yourself and installing it :
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/440.82/NVIDIA-Linux-x86_64-440.82.run
Then run it in sudo mode :
sudo bash NVIDIA-Linux-x86_64-440.82.run
Accept everything and you should be okay to use your GPU