Running CUDA programs on VirtualMachines

Hi, Is it possible to run CUDA programs such as python files that use CUDA syntax and compile .cu files in Ubuntu 20.04 running on VirtualMachines. I have a laptop with Ryzen 9 and RTX 2060 Mq.