I saw a video where a guy compiled one of his cuda program in a virtual box. Can anyone tell me how to do that?
Please go to 01:09:00 in that video to see he compiled the program in virgualbox .
PS: I have a gtx 970 card and the other graphic card installed on my workstation, but I don't want to install a real Ubuntu on it, I just want to using a VM to test the cuda world.
OS Support Policy. CUDA support for Ubuntu 18.04. x, Ubuntu 20.04. x, Ubuntu 22.04.
CUDA (Compute Unified Device Architecture) is a parallel computing architecture developed by Nvidia for graphics processing. This document provides instructions to install/remove Cuda 4.2 on Ubuntu 12.04.
Answer to my own question: GPU virtualization is supported by VMWare. Need to install hypervisor on host machine that has graphics card. vDGA is achieved by setting device passthrough on the graphics card and assigning the card to individual virtual machine. Then CUDA code can run on the virtual machine.
Yes, it's possible.
The presenter in the video is using an Amazon EC2 cloud GPU instance.
In general, many types of VM (virtual machine) offerings can host a linux OS, upon which the CUDA toolkit could be loaded and codes compiled that way.
There is a difference between compiling a code and running a CUDA code, however. Running a CUDA code usually requires a CUDA GPU be present/available. This can be done using some types of VMs/hypervisors, but not every VM hypervisor supports the ability to place a physical GPU device into a VM (which is required, currently, to be able to run a CUDA code in a VM).
In general, to provide a GPU within a VM suitable for CUDA usage (currently) it is necessary for the VM/hypervisor to support some sort of PCI Passthrough capability.
Providing a full step-by-step tutorial would depend on the choice of specific hypervisor and is beyond the scope of an answer I can provide here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With