allenai / allenai/ai2thor

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

オープン
#811 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
1.8k
フォーク
297
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。