Step-by-step nvidia GPU passthrough for cuda/vulkan compute applications

I kid you not, you need working Optimus Prime for this, or break qubes gui integration and render on your GPU directly (with a monitor connected to it) (which also leaves you with a full desktop in a qube, but without clipboard sharing)

p.s.
If you have prime, see NVIDIA Optimus - Debian Wiki
If you don’t, use this guide (or any other guide really) to create a qube with full desktop