Open3D
Open3D copied to clipboard
How to visualize in remote docker container?
Checklist
- [X] I have searched for similar issues.
- [X] For Python issues, I have tested with the latest development wheel.
- [X] I have checked the release documentation and the latest documentation (for
masterbranch).
My Question
I am looking for a solution about visualization in remote docker container. Here are my steps when I tried to solve this issue:
- Visualize in web or jupyter. http://www.open3d.org/docs/latest/tutorial/visualization/web_visualizer.html. This is my top-1 solution, I installed with the latest open3d using pip and this is my code:
o3d.visualization.webrtc_server.enable_webrtc()
cube_red = o3d.geometry.TriangleMesh.create_box(1, 2, 4)
cube_red.compute_vertex_normals()
cube_red.paint_uniform_color((1.0, 0.0, 0.0))
o3d.visualization.draw(cube_red)
But this error occurs:
[Open3D INFO] WebRTC GUI backend enabled.
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/app/somic/demo.ipynb Cell 2 in <cell line: 1>()
----> [1] o3d.visualization.webrtc_server.enable_webrtc()
[2] cube_red = o3d.geometry.TriangleMesh.create_box(1, 2, 4)
[3] cube_red.compute_vertex_normals()
RuntimeError: [Open3D Error] (void open3d::visualization::gui::Application::SetWindowSystem(std::shared_ptr<open3d::visualization::gui::WindowSystem>)) /root/Open3D/cpp/open3d/visualization/gui/Application.cpp:360: Cannot set WindowSystem. It is already set.
- I added the Xserver option in docker option
X server: -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAYbut it didn't work. - I added many dependencies from this page http://www.open3d.org/docs/latest/docker.html so that open3d is headless version. But I met this error:
[Open3D INFO] EGL headless mode enabled.
FEngine (64 bits) created at 0x7f2d3386a010 (threading is enabled)
eglInitialize failed
Segmentation fault (core dumped)
Any help is appreciated. 🙏
Thank you for this amzing library, I have the same issue I can use webrtc outside of docker but within docker I get the following error Docker libEGL warning: DRI2: failed to authenticate although I specify -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY and --gpus all and I can use the o3dvisualizer without webrtc in docker so it seems to be a problem with webrtc maybe I need to expose some port to broadcast the webrtc visualizer ? Thank you very much for your help