Hi,
New to gym. I have a nvidia-docker container with cntk installed, and wish to use reinforcement learning algorithms on some gym environments.
I started up the container by following the instructions here, installed apt install python-opengl and tried to render a simple simulation as follows
import gym
gym.make('Pong-v0').render()
On doing this i am greeted with the error message
NoSuchDisplayException: Cannot connect to "None"
Can someone direct me in how to use nvidia docker containers to run gym environments.
try this link
Thanks for answering this @MuLx10! As the link describes you need to run an X11 server on linux in order to get rendering to work, at least until pyglet supports EGL rendering: https://bitbucket.org/pyglet/pyglet/issues/219/egl-support-headless-rendering
I am running it in WSL on windows. Same error. I am running an X11 server. I think I need to set the display first.
Yep, this did the trick:
export DISPLAY=localhost:0.0
Yep, this did the trick:
export DISPLAY=localhost:0.0
I had to replace localhost with the actual private IP 192.168.1.111:0.0
I also faced the same issue. I was doing it on Colab and Jupyter Notebook. I got the same errors.
Then I tried to run it on PyCharm and it worked!
Most helpful comment
Yep, this did the trick: