[Solved] Installing CUDA SDK on a Linux Guest

Discussions about using Linux guests in VirtualBox.
Post Reply
mark_d
Posts: 2
Joined: 5. Oct 2019, 03:55

[Solved] Installing CUDA SDK on a Linux Guest

Post by mark_d »

I am trying to create a Ubuntu Linux 16.04 VM to use for (re) compiling working code on a particular collection of legacy libraries, including CUDA 8.0, to match a target system.

I don't need or want to use nvidia drivers on the VM but I need the CUDA libraries to link to.

When I install the CUDA SDK distribution, it also installs the nvidia drivers and alters the startup process to try to use them. As soon as I log in with CUDA installed, the nvidia driver detects that there is no hardware, terminates the process and returns me to the log in prompt.

If I compile my code immediately after installing CUDA, without rebooting, everything works as it should and I get a good compile so I'm very close to success if I could prevent Linux from trying to use the nvidia driver.

I've seen references to xorg.conf having something to do with this process but I'm not finding that file where it is supposed to be so I suspect that I'm missing something. I've found copies of xorg.conf.d and xorg.conf.failsafe at various places in the file system but no /etc/X11/xorg.conf.

Can anyone who knows more about Ubuntu than I do, suggest what needs to be done to prevent linux from trying to start the nvidia drivers? I have a clone of my VM without CUDA installed that starts up fine. If I knew what files are relevant to the graphics startup, I'd be tempted to try copying them from the noCUDA VM to the VM with CUDA.
Last edited by mark_d on 11. Oct 2019, 21:32, edited 1 time in total.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Installing CUDA SDK on a Linux Guest

Post by socratis »

mark_d wrote:Can anyone who knows more about Ubuntu than I do, suggest what needs to be done to prevent linux from trying to start the nvidia drivers?
This is more of an Ubuntu-specific question rather than a VirtualBox one. Have you tried the Ubuntu forums? That's where I would head first, and I'd be sure to let them know that this operation is done inside a VM, which doesn't have a real Nvidia card, just a generic, fake GPU.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mark_d
Posts: 2
Joined: 5. Oct 2019, 03:55

Re: Installing CUDA SDK on a Linux Guest

Post by mark_d »

This question was answered in the Stackoverflow forum. I have attached a link in case anyone else has the same question:
https://stackoverflow.com/questions/582 ... redirect=1
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Solved] Installing CUDA SDK on a Linux Guest

Post by socratis »

You could have simply quoted the reply, much easier to deal with:
If you use the runfile install method, the runfile installer has options to not install the driver. If you use a deb (package manager) install method provided by NVIDIA you can just "install cuda-toolkit-8-0" instead of "install cuda" to get the toolkit install without the drivers. This information is covered in the CUDA linux install guide and in numerous topics on the web.
Thank you for providing the solution, even though technically this is not a VirtualBox issue...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply