can i run nvidia dependent product on ubuntu vm from compute engine?

75 views
Skip to first unread message

Erjan G.

unread,
Aug 18, 2020, 8:49:45 AM8/18/20
to gce-discussion
i have started an instance of ubuntu on gcp. I installed ubuntu desktop and connected to my machine using Nomachine. All fine.

I have some small pet project that needs nvidia drivers and cuda. I only need to test it with some rest api. I m building this rest api. The voice recognition model is trained and just needs nvidia driver>410.

what is my ubuntu? is it a VM? do i have access to physical gpu graphics card? This is what bothers me - i read on forums that to use  graphics card - ubuntu OS must be installed not running in virtual mode.

my question - can my ubuntu on gcp use/run nvidia drivers? or it can't cuz it's purely a virtual machine?


Aakash Gupta

unread,
Aug 18, 2020, 9:03:44 AM8/18/20
to Erjan G., gce-discussion
To answer your question - Yes, you get a GPU. 
Theres also an option to spin a multi-Gpu VM. 

Did you try spinning up a deep learning VM. 
You get the option to pre - install the nvidia drivers. 




--
© 2018 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/8de069a4-c59f-44c5-b261-7674fc8f387ao%40googlegroups.com.

Md Mahboob Sayeed Khan

unread,
Aug 18, 2020, 4:37:13 PM8/18/20
to gce-discussion

Hi Erjan,


According to the doc [1], you can install NVIDIA GPU drivers in ubuntu and also be able to verify that using the command “nvidia-smi”. This command will let you know that the driver is running properly.


[1] https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#ubuntu


Thanks

Erjan G.

unread,
Aug 26, 2020, 12:26:18 PM8/26/20
to gce-discussion
thx u, i tried all that stuff on my local pc and failed, now reverting back to gcp :)))

so the instance i launch - it does have physical hardware? it's not just a VM? i mean it does have some physical nvidia drivers - and i just need to install nvidia software to recognize it?

Md Shafiqul Islam

unread,
Aug 26, 2020, 4:01:35 PM8/26/20
to gce-discussion

Hello,

 

Compute Engine provides graphics processing units (GPUs) that you can add to your virtual machine instances. 

 

You will need to follow the documentation [1] to create a instance with a GPU and will need to follow the documentation [2] which is to install the GPU driver on your instance so that your system can use the device.

 

 

[1] https://cloud.google.com/compute/docs/gpus/add-gpus#create-new-gpu-instance

[2] https://cloud.google.com/compute/docs/gpus/install-drivers-gpu

Erjan G.

unread,
Aug 26, 2020, 4:11:53 PM8/26/20
to gce-discussion
sir thx u for this quick reply!  i have launched ubuntu instance 2h ago and installed ubuntu desktop on top of it myself. i used nomachine program to connect remotely. all fine.
however - that vm instance is 'vCPU' - it means it has no gpu in it - do i need to start a new instance with gpu support or i can "attach" gpu to existing ?

Hasanul Murad

unread,
Aug 27, 2020, 7:27:48 PM8/27/20
to gce-discussion
You can add or detach GPUS on your existing instance, but you must first stop the instance and change its host maintenance setting so that it terminates rather than live-migrating.
Reply all
Reply to author
Forward
0 new messages