Compiling blender: using nvidia-docker CUDA for cycles and opensubdiv?

Hi,

I am looking to compile blender on Void Linux. Cuda does not mesh well with a rolling release distro and has proven to be tricky to get working.
In the distro community people are looking to nvidia-docker for cuda.
Does anybody here have experience using nvidia-docker to compile the cycles renderkernels and opensubdiv lib ?

thanks.
S