How can OpenAI Gym‘s visualizations work within Docker?

题意:OpenAI Gym 的可视化功能如何在 Docker 中运行?

问题背景:

I'd like to get OpenAI Gym working with the rendered OpenGL visualizations within a docker container.

我想在 Docker 容器中让 OpenAI Gym 与渲染的 OpenGL 可视化一起工作

It's straightforward to get OpenAI Gym running within Docker. However, it's not immediately clear how to get the rendered environment to display in a window on my OS X laptop when you call env.render() on an OpenAI environment within the Docker container.

在 Docker 中运行 OpenAI Gym 是很直接的。然而,当你在 Docker 容器内调用 env.render() 时,如何在我的 OS X 笔记本电脑上显示渲染的环境窗口并不明显

How do I go about this?

我该怎么做呢?

问题解决:

You can try sharing your X11 socket file with your container... That way your container can write to it and it will show on you machine:

你可以尝试将 X11 套接字文件与容器共享......这样容器就可以写入它,渲染的内容将显示在你的机器上

Something like this:

类似这样的:

python 复制代码
docker run --privileged=true --rm \
    -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix \
    ...
相关推荐
m0_741768854 小时前
使用docker的小例子
运维·docker·容器
最新小梦7 小时前
Docker日志管理
运维·docker·容器
营赢盈英7 小时前
Allow anonymous access to my Azure OpenAI chat bot
ai·openai·azure·webapps
程序员小川7 小时前
Ubuntu22.04安装paddle
ai·cuda·paddle·cudnn
ZHOU西口8 小时前
微服务实战系列之玩转Docker(十五)
nginx·docker·微服务·云原生·swarm·docker swarm·dockerui
lgbisha9 小时前
828华为云征文|华为云Flexus X实例docker部署最新Appsmith社区版,搭建自己的低代码平台
低代码·docker·华为云
记得开心一点嘛9 小时前
在Linux系统上使用Docker部署javaweb项目
linux·运维·docker
Persistence is gold11 小时前
cassandra指定配置文件的docker启动方法
运维·docker·容器
C语言扫地僧12 小时前
Docker 镜像制作(Dockerfile)
linux·服务器·docker·容器
AI极客菌14 小时前
Stable Diffusion绘画 | 生成高清多细节图片的各个要素
人工智能·ai·ai作画·stable diffusion·aigc·midjourney·人工智能作画