Error running headless Paraview EGL image in Docker

Hi all,

Trying to run kitware/paraview:pv-v5.8.0-egl-py3 image in docker using following command

docker run --gpus all -ti kitware/paraview:pv-v5.8.0-egl-py3

But when I`m starting pvpython process after checking GL information I’ve got segfault

$ ./bin/pvpython --force-offscreen-rendering
Python 3.6.9 (default, Nov  7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from paraview.simple import *
>>> print(GetOpenGLInformation().GetCapabilities())
(  18.568s) [main thread     ] vtkEGLRenderWindow.cxx:311   WARN| vtkEGLRenderWindow (0x55e542b7d7c0): Setting an EGL display to device index: 0 require EGL_EXT_device_base EGL_EXT_platform_device EGL_EXT_platform_base extensions
(  18.568s) [main thread     ] vtkEGLRenderWindow.cxx:382    ERR| vtkEGLRenderWindow (0x55e542b7d7c0): Only EGL 1.4 and greater allows OpenGL as client API. See eglBindAPI for more information.
(  18.569s) [main thread     ]vtkOpenGLRenderWindow.c:565    ERR| vtkEGLRenderWindow (0x55e542b7d7c0): GLEW could not be initialized: Missing GL version

Loguru caught a signal: SIGSEGV
Stack trace:
0       0x7f7371290f20 /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f7371290f20]
(  18.569s) [main thread     ]                       :0     FATL| Signal: SIGSEGV
Segmentation fault

The host machine is Windows 10 21H2, graphics card RTX 3050 NVIDIA card with 511.65 driver version.

What am I missing?
Thanks.

Did you try the nvidia image to validate that your runtime is properly setup?

sudo docker run --gpus all --rm nvidia/cuda:9.0-base nvidia-smi

You may want to pick a newer version of the cuda image but the idea is here.

My host machine is Windows. Here is output

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.47.03    Driver Version: 511.65       CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:01:00.0 Off |                  N/A |
| N/A   41C    P5    12W /  N/A |      0MiB /  4096MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

I’m not sure about the capability part but it seems that you should be good to go.

No need to do the --force-offscreen-rendering since your binary is the EGL one.

You should be able to do the following without crash in docker/pvpython

from paraview.simple import *
Cone()
Show()
Render()

Still the same error.

Since the “latest” nvidia image is working for you, can you build one where you download/untar pv egl and use it?

Taking a binary from here and doing something like that but with a local file rather than downloading it?