Browse Source

launch alicevision/meshroom gui

Fabian Peter Hammerle 3 years ago
commit
d5850a9b8d
2 changed files with 52 additions and 0 deletions
  1. 32 0
      Dockerfile
  2. 20 0
      docker-compose.yml

+ 32 - 0
Dockerfile

@@ -0,0 +1,32 @@
+# locked PySide2==5.14.1 requires python<3.9
+# https://github.com/alicevision/meshroom/blob/8d0cd745811320ab27245eabb56997b00ba3a70e/requirements.txt#L4
+FROM python:3.8-slim-buster
+
+ARG MESHROOM_PATH=/meshroom
+RUN apt-get update \
+    && apt-get install --yes --no-install-recommends git \
+    && rm -r /var/lib/apt/lists \
+    && useradd --create-home mesh \
+    && mkdir $MESHROOM_PATH \
+    && chown mesh $MESHROOM_PATH
+USER mesh
+WORKDIR $MESHROOM_PATH
+
+ARG MESHROOM_REVISION=8d0cd745811320ab27245eabb56997b00ba3a70e
+RUN git clone --recursive https://github.com/alicevision/meshroom.git . \
+    && git checkout $MESHROOM_REVISION
+RUN pip install --user --requirement requirements.txt
+
+# TODO merge up
+USER root
+# > ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory
+# > ImportError: libGL.so.1: cannot open shared object file: No such file or directory
+# > qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
+RUN apt-get update \
+    && apt-get install --yes --no-install-recommends libglib2.0-0 libgl1
+RUN apt-get update \
+    && apt-get install --yes --no-install-recommends libqt5gui5 libfontconfig1
+USER mesh
+
+ENV PYTHONPATH=$MESHROOM_PATH
+CMD ["python", "meshroom/ui"]

+ 20 - 0
docker-compose.yml

@@ -0,0 +1,20 @@
+version: '2.2'
+
+# $ Xephyr -resizeable :21
+
+services:
+  meshroom:
+    build: .
+    image: fphammerle/alicevision-meshroom
+    container_name: meshroom
+    environment:
+    - DISPLAY=:21
+    #- QT_DEBUG_PLUGINS=1
+    # read_only: true TODO
+    volumes:
+    - /tmp/.X11-unix/X21:/tmp/.X11-unix/X21:rw
+    network_mode: none
+    security_opt: [no-new-privileges]
+    cap_drop: [ALL]
+
+# https://docs.docker.com/compose/compose-file/compose-file-v2/