I have created the VM using GCP Console in browser.
While creating VM, I selected the VM Image as "c2-deeplearning-pytorch-1-8-cu110-v20210619-debian-10". Also, I selected GPU as T4.
VM gets created and started and it shows green icon in browser.
Then I try to connect from "gcloud compute ssh " and it asks if I want to install nVidia Driver and I do Y, then it gives error for lock file and driver is not installed as:
This VM requires Nvidia drivers to function correctly. Installation takes ~1 minute. Would you like to install the Nvidia driver? [y/n] y Installing Nvidia driver. install linux headers: linux-headers-4.19.0-16-cloud-amd64 E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. Nvidia driver installed.
I try to verify if driver is installed by running python code as:
import torch torch.cuda.is_available() #returns False.
Anybody else faced this issue?
Solution to my problem was:
It works then.