OffScreenRenderer with Python and Docker on Linux #5001
-
Hello, I am trying to run the OffScreenRenderer on a remote Linux server under Docker. I am not very comfortable with Linux or Docker! I have tried using the Docker example from Open3d copied below with the image rendering example file. Any help or advice is very welcome I use No switches
FEngine (64 bits) created at 0x7fe6a5b93010 (threading is enabled)
FEngine resolved backend: OpenGL
Failed to open X display. (exiting). Intel GPU switches
docker: Error response from daemon: error gathering device information while adding custom device "/dev/dri": no such file or directory.
ERRO[0000] error waiting for container: context canceled X Server switches
FEngine (64 bits) created at 0x7f77d9852010 (threading is enabled)
FEngine resolved backend: OpenGL
Failed to open X display. (exiting). Dockerfile# This could also be another Ubuntu or Debian based distribution
FROM python:3.9-bullseye
# Install Open3D system dependencies and pip
RUN apt-get update && apt-get install --no-install-recommends -y \
libgl1 \
libgomp1 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Install Open3D from the pypi repositories
RUN python3 -m pip install --no-cache-dir --upgrade open3d
# Copy python file into the docker container and run it
COPY render_to_image.py .
CMD python3 -u render_to_image.py |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
** UPDATE ; See reply below for solution ** The following Dockerfile, using OutputFEngine (64 bits) created at 0x7f167660f010 (threading is enabled)
FEngine resolved backend: OpenGL
Saving image at test.png
Saving image at test2.png
corrupted size vs. prev_size in fastbins
Aborted (core dumped) Dockerfile# This could also be another Ubuntu or Debian based distribution
FROM python:3.9-bullseye
# Install Open3D system dependencies and pip
RUN apt-get update && apt-get install --no-install-recommends -y \
libgl1 \
xauth \
xvfb \
libgomp1 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Install Open3D from the pypi repositories
RUN python3 -m pip install --no-cache-dir --upgrade open3d
COPY render_to_image.py .
CMD xvfb-run -a python3 -u render_to_image.py |
Beta Was this translation helpful? Give feedback.
** UPDATE ; See reply below for solution **
The following Dockerfile, using
xvfb
withxvfb-run
and requiringxauth
seems to work, in that it generates the test images but then something clearly goes very wrong afterwards. I am able to work around this by running the python code viamultiprocessing
as described here: #4437Output
FEngine (64 bits) created at 0x7f167660f010 (threading is enabled) FEngine resolved backend: OpenGL Saving image at test.png Saving image at test2.png corrupted size vs. prev_size in fastbins Aborted (core dumped)
Dockerfile