I am trying to pull this of for quite a few time. I want to run pygame.init() inside docker container. Following are the steps are taken to achieve::
Fresh ubuntu 20.04 with nvidia 460 proprietary drivers version installed.
Docker installed from docker documentation.
Nvidia-docker 2 installed for gpu usage inside the container.
Run docker container with following command:
docker run -it -e DISPLAY --net host --gpus all nvcr.io/nvidia/tensorflow:20.06-tf2-py3
However when I install pygame inside the container it doesn’t work.
Since it throws an error
pygame.error: No available video device
I have also tried glxgears it doesnt work either. However I found this cuda/opengl repo inside which glxgears works very well.
What should I install or configure so that my display is available in nvcr.io container.
Note: I have already done sudo xhost + command