You need ESXi and a compatible gpu. (check your bios for passthrough activation) When you have that, you need to add your gpu as a new device (pci most of the time) to the vm. After installing the drivers to your vm os you are ready to go.
PM me if you have questions.