Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open3D error show in docker #4174

Closed
fellen88 opened this issue Oct 18, 2021 · 4 comments · Fixed by #4671
Closed

open3D error show in docker #4174

fellen88 opened this issue Oct 18, 2021 · 4 comments · Fixed by #4671

Comments

@fellen88
Copy link

I want to show pointcloud in docker, however ,there are errors report as below:

[Open3D WARNING] GLFW Error: X11: Failed to open display unix:1
[Open3D WARNING] Failed to initialize GLFW

@forrestjgq
Copy link
Contributor

make sure xhost is executed in host:

sudo xhost +

and check host $DISPLAY env. If $DISPLAY is unix:1 or :1, the $DISPLAY in docker should be set to unix:1

@fellen88
Copy link
Author

fellen88 commented Nov 1, 2021

make sure xhost is executed in host:

sudo xhost +

and check host $DISPLAY env. If $DISPLAY is unix:1 or :1, the $DISPLAY in docker should be set to unix:1

My host $DISPLAY env is unix:1 and I run xhost + ,then I got another error below:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[Open3D WARNING] GLFW Error: GLX: Failed to create context: BadMatch (invalid parameter attributes)
[Open3D WARNING] Failed to create window

@ssheorey
Copy link
Member

Hi @fellenB your docker container needs access to the GPU for visualization to work. This is GPU specific:

@forrestjgq
Copy link
Contributor

I've some issue similar with that, and fixed by checking opengl library version with nvidia driver version.
For example, the nvidia-smi shows:

Fri Jan 14 18:15:14 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.86       Driver Version: 470.86       CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+

here the driver version is 470.86, so you need to install libnvidia-gl-470 with same minor version. This is apt searching result:

$ apt search libnvidia-gl-470
libnvidia-gl-465/focal-updates,focal-security 470.86-0ubuntu0.20.04.2 amd64
  Transitional package for libnvidia-gl-470

libnvidia-gl-470/focal-updates,focal-security,now 470.86-0ubuntu0.20.04.2 amd64 [已安装,自动]
  NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD

Note now 470.86-0ubuntu0.20.04.2 amd64 here must be 470.86

@ssheorey ssheorey linked a pull request Jan 31, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants