This seems like something that people must be doing but I have been struggling with it. The use case is to make use of my GPU for some P-MCMC and machine learning (Xgboost).
So far I have got to the stage of having nvidia-docker (https://github.com/NVIDIA/nvidia-docker) working on my system (the example nvidia-smi container works fine).
Most of the suggested solutions I have seen recommended basing the container image on one of the nvidia supplied cuda images. The others recommend a manual install but I have been struggling to get this working. I would much prefer sticking with the rocker base image so any ideas would be great.