How to visualize in remote docker container?
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
### Checklist
- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).
### 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:
1. 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 ()
----> [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)) /root/Open3D/cpp/open3d/visualization/gui/Application.cpp:360: Cannot set WindowSystem. It is already set.
```
2. I added the Xserver option in docker option ``X server: -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY`` but it didn't work.
3. 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:
```root@0dd5c166bbdc:/app/open3d-headless-docker# python render_to_image.py
[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. 🙏
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Web Visualizer and Docker documentation linked in the issue, then reproduce the enable_webrtc snippet and render_to_image.py in the reported container setups. Compare the WindowSystem, EGL initialization, and segmentation-fault errors across the web, X server, and headless attempts; the issue is done when a documented working approach or a clear environment limitation is established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- computer-graphics, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100