allenai / allenai/ai2thor

Run Ai2thor in a docker container (ubuntu 20.04 system) And access GUI on windows 10 host

Abierto
#811 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C#
Estrellas
1.8k
Forks
297
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Hi @ekolve @synapticarbors @Lucaweihs @dirkgr @schmmd

Thank you so much for creating this powerful simulator!

Since I have a Windows laptop, and it seems AI2THOR support Linux, so I create a docker container with a Ubuntu 20.04 system and install ai2thor using `pip install`. Then I try to convey the GUI of simulator from container to Windows X server.

I already configured the correct DISPLAY variable and launch a VcXsrv on Windows. I try first to run some X11-apps in container, such as xeyes, xclock, and I can successfully see the GUI of them from Windows. But when I try to run ai2thor example, it always said `Platform Linux64 failed validation with the following errors: Invalid display, non-existent screen:192.168.1.67:0.0`. But this `"192.168.1.67:0.0" is just what I use for xeyes or xclock and they all work.

The I trace back from the error and found that the ai2thor program tries to validate my screen using this function from ai2thor.platform.py
`@classmethod
def _valid_x_displays(cls, width, height): \\
open_display_strs = [
int(os.path.basename(s)[1:]) for s in glob.glob("/tmp/.X11-unix/X[0-9]*")
]
valid_displays = []
for display_str in open_display_strs:
try:
disp = Xlib.display.Display(":%s" % display_str)
for screen in range(0, disp.screen_count()):
disp_screen_str = ":%s.%s" % (display_str, screen)
if cls._is_valid_screen(disp_screen_str, width, height):
valid_displays.append(disp_screen_str)
except Xlib.error.DisplayConnectionError as e:
warnings.warn(
"could not connect to X Display: %s, %s" % (display_str, e)
)
return valid_displays`

And I double-check the ubuntu container and found out I have no "/tmp/.X11-unix/X[0-9]*" exist. I guess this unix socket is probably the reason but I don't know how to fix. Since my X server is actually on Windows, not in the ubuntu container.

Could you please take a look and help me with it? Thanks a lot! (it took me two days)

p.s. I know there is a ai2thor-docker but on my Windows machine I don't have Nvidia-GPU and CUDA things, so I didn't try that.

Best
Xubo

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.