forked from alicevision/Meshroom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
60 lines (49 loc) · 1.93 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
ARG CUDA_TAG=7.0
ARG OS_TAG=7
FROM alicevision:centos${OS_TAG}-cuda${CUDA_TAG}
LABEL maintainer="AliceVision Team [email protected]"
# Execute with nvidia docker (https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0))
# docker run -it --runtime=nvidia meshroom
ENV MESHROOM_DEV=/opt/Meshroom \
MESHROOM_BUILD=/tmp/Meshroom_build \
MESHROOM_BUNDLE=/opt/Meshroom_bundle \
QT_DIR=/opt/qt/5.11.0/gcc_64 \
PATH="${PATH}:${MESHROOM_BUNDLE}"
COPY . "${MESHROOM_DEV}"
# Install libs needed by Qt
RUN yum install -y \
flex \
fontconfig \
freetype \
glib2 \
libICE \
libX11 \
libxcb \
libXext \
libXi \
libXrender \
libSM \
libXt-devel \
libGLU-devel \
mesa-libOSMesa-devel \
mesa-libGL-devel \
mesa-libGLU-devel \
xcb-util-keysyms \
xcb-util-image
# Install Python3
RUN yum install -y centos-release-scl
RUN yum install -y rh-python36
# Install Meshroom requirements and freeze bundle
RUN source scl_source enable rh-python36 && cd "${MESHROOM_DEV}" && pip install -r dev_requirements.txt -r requirements.txt && python setup.py install_exe -d "${MESHROOM_BUNDLE}"
# Install Qt (to build plugins)
WORKDIR /tmp/qt
RUN curl -LO http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run
RUN chmod u+x qt-unified-linux-x64-online.run
RUN ./qt-unified-linux-x64-online.run --verbose --platform minimal --script "${MESHROOM_DEV}/docker/qt-installer-noninteractive.qs"
WORKDIR ${MESHROOM_BUILD}
# Temporary workaround for qmlAlembic build
RUN rm -rf "${AV_INSTALL}/lib" && ln -s "${AV_INSTALL}/lib64" "${AV_INSTALL}/lib"
# Build Meshroom plugins
RUN cmake "${MESHROOM_DEV}" -DALICEVISION_ROOT="${AV_INSTALL}" -DQT_DIR="${QT_DIR}" -DCMAKE_INSTALL_PREFIX="${MESHROOM_BUNDLE}/qtPlugins"
RUN make -j8
RUN mv "${AV_BUNDLE}" "${MESHROOM_BUNDLE}/aliceVision"