How to run OpenAI Gym .render() over a server

前端 未结 15 2153
囚心锁ツ
囚心锁ツ 2020-12-12 10:07

I am running a python 2.7 script on a p2.xlarge AWS server through Jupyter (Ubuntu 14.04). I would like to be able to render my simulations.

Minimal working example<

15条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 10:40

    There's also this solution using pyvirtualdisplay (an Xvfb wrapper). One thing I like about this solution is you can launch it from inside your script, instead of having to wrap it at launch:

    from pyvirtualdisplay import Display
    display = Display(visible=0, size=(1400, 900))
    display.start()
    

提交回复
热议问题