-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[docker] Add option to set qtAV version and fix Rocky issues #3145
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
base: develop
Are you sure you want to change the base?
Changes from 3 commits
1e2218f
4fc8281
dd565dc
02ad8ea
257b2ed
526f3b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ ARG AV_VERSION | |
| ARG CUDA_VERSION | ||
| ARG ROCKY_VERSION | ||
| FROM alicevision/meshroom-deps:${MESHROOM_VERSION}-av${AV_VERSION}-rocky${ROCKY_VERSION}-cuda${CUDA_VERSION} | ||
| ARG QTAV_VERSION | ||
| LABEL maintainer="AliceVision Team alicevision-team@googlegroups.com" | ||
|
|
||
| # Execute with nvidia docker (https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0)) | ||
|
|
@@ -11,12 +12,12 @@ LABEL maintainer="AliceVision Team alicevision-team@googlegroups.com" | |
|
|
||
| RUN dnf install -y patchelf | ||
|
|
||
| ENV MESHROOM_DEV=/opt/Meshroom \ | ||
| MESHROOM_BUILD=/tmp/Meshroom_build \ | ||
| MESHROOM_BUNDLE=/opt/Meshroom_bundle \ | ||
| AV_INSTALL=/opt/AliceVision_install \ | ||
| QT_DIR=/opt/Qt/6.8.3/gcc_64 \ | ||
| PATH="${PATH}:${MESHROOM_BUNDLE}" | ||
| ENV MESHROOM_DEV=/opt/Meshroom | ||
| ENV MESHROOM_BUILD=/tmp/Meshroom_build | ||
| ENV MESHROOM_BUNDLE=/opt/Meshroom_bundle | ||
| ENV AV_INSTALL=/opt/AliceVision_install | ||
| ENV QT_DIR=/opt/Qt/6.8.3/gcc_64 | ||
| ENV PATH="${PATH}:${MESHROOM_BUNDLE}" | ||
|
Comment on lines
+15
to
+19
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Splitting the environment variables into multiple |
||
|
|
||
| COPY *.txt *.md *.py ${MESHROOM_DEV}/ | ||
| COPY ./docs ${MESHROOM_DEV}/docs | ||
|
|
@@ -46,7 +47,7 @@ RUN mkdir ${MESHROOM_BUNDLE}/aliceVision && \ | |
| mv /opt/AliceVision_bundle/* ${MESHROOM_BUNDLE}/aliceVision | ||
|
|
||
| # Build Meshroom plugins | ||
| RUN cmake "${MESHROOM_DEV}" -DALICEVISION_ROOT="${AV_INSTALL}" -DCMAKE_INSTALL_PREFIX="${MESHROOM_BUNDLE}/qtPlugins" | ||
| RUN cmake "${MESHROOM_DEV}" -DALICEVISION_ROOT="${AV_INSTALL}" -DQTALICEVISION_VERSION=${QTAV_VERSION} -DCMAKE_INSTALL_PREFIX="${MESHROOM_BUNDLE}/qtPlugins" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is safer to wrap |
||
| RUN make "-j$(nproc)" QtAliceVision | ||
| RUN make "-j$(nproc)" && \ | ||
| rm -rf "${MESHROOM_BUILD}" "${MESHROOM_DEV}" \ | ||
|
|
@@ -59,14 +60,13 @@ RUN make "-j$(nproc)" && \ | |
| aliceVision/share/pkgconfig | ||
|
|
||
| # PySide6: copy missing libQt63DQuickScene3D.so along with its dependencies to avoid runtime issues | ||
| RUN cp ${QT_DIR}/lib/libQt63DQuickScene3D.so.6.8.3 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs && \ | ||
| mv ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs/libQt63DQuickScene3D.so.6.8.3 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs/libQt63DQuickScene3D.so.6 && \ | ||
| cp ${MESHROOM_BUNDLE}/lib/PySide6/Qt/lib/libQt6Concurrent.so.6 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs && \ | ||
| cp ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/Qt3D/Animation/libQt63DAnimation.so.6 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs && \ | ||
| cp ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/Qt3D/Core/libQt63DCore.so.6 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs && \ | ||
| cp ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/Qt3D/Input/libQt63DInput.so.6 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs && \ | ||
| cp ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/Qt3D/Logic/libQt63DLogic.so.6 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs && \ | ||
| cp ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/Qt3D/Render/libQt63DRender.so.6 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs | ||
| RUN cp ${QT_DIR}/lib/libQt63DQuickScene3D.so.6.8.3 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs/libQt63DQuickScene3D.so.6 | ||
|
|
||
| # cp ${MESHROOM_BUNDLE}/lib/PySide6/Qt/lib/libQt6Concurrent.so.6 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs && | ||
| # cp ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/Qt3D/Core/libQt63DCore.so.6 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs && \ | ||
| # cp ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/Qt3D/Input/libQt63DInput.so.6 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs && \ | ||
| # cp ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/Qt3D/Logic/libQt63DLogic.so.6 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs && \ | ||
| # cp ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/Qt3D/Render/libQt63DRender.so.6 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/qml/QtQuick/Dialogs | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| # Copy libOpenGL in the bundle: needed by QtAliceVision as a side effect of a Qt6 bug | ||
| RUN cp /usr/lib64/libOpenGL.so.0.0.0 ${MESHROOM_BUNDLE}/lib | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,17 +7,17 @@ LABEL maintainer="AliceVision Team alicevision-team@googlegroups.com" | |
| # 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 \ | ||
| QT_DIR=/opt/Qt/6.8.3/gcc_64 \ | ||
| QT_CI_LOGIN=alicevisionjunk@gmail.com \ | ||
| QT_CI_P=azerty1. | ||
| ENV MESHROOM_DEV=/opt/Meshroom | ||
| ENV MESHROOM_BUILD=/tmp/Meshroom_build | ||
| ENV QT_DIR=/opt/Qt/6.8.3/gcc_64 | ||
| ENV QT_CI_LOGIN=alicevisionjunk@gmail.com | ||
| ENV QT_CI_P=azerty1. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| # Install libs needed by Qt | ||
| RUN dnf update -y | ||
| RUN dnf update -y --nobest | ||
| RUN dnf install -y flex fontconfig freetype glib2-devel libICE | ||
| RUN dnf install -y libX11 libXext libXi libXrender libSM | ||
| RUN dnf install -y libXt-devel mesa-libGLU-devel mesa-libOSMesa-devel mesa-libGL-devel mesa-libEGL-devel | ||
| RUN dnf install -y libXt-devel mesa-libGLU-devel mesa-libGL-devel mesa-libEGL-devel | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Combining the package update and installation commands into a single |
||
| RUN dnf install -y zlib-devel systemd openssh-server | ||
| RUN dnf install -y libxcb-devel \ | ||
| libxkbcommon-devel \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,7 +1,8 @@ | ||||||
| #!/bin/bash | ||||||
| set -e | ||||||
| set -ex | ||||||
|
|
||||||
| test -z "$MESHROOM_VERSION" && MESHROOM_VERSION="$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD)" | ||||||
| test -z "$QTAV_VERSION" && echo "qtAliceVision version not specified, set QTAV_VERSION in the environment" && exit 1 | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Error messages should be redirected to standard error (
Suggested change
|
||||||
| test -z "$AV_VERSION" && echo "AliceVision version not specified, set AV_VERSION in the environment" && exit 1 | ||||||
| test -z "$CUDA_VERSION" && CUDA_VERSION=12.1.1 | ||||||
| test -z "$ROCKY_VERSION" && ROCKY_VERSION=9 | ||||||
|
|
@@ -33,6 +34,7 @@ docker build \ | |||||
| --build-arg "MESHROOM_VERSION=${MESHROOM_VERSION}" \ | ||||||
| --build-arg "CUDA_VERSION=${CUDA_VERSION}" \ | ||||||
| --build-arg "ROCKY_VERSION=${ROCKY_VERSION}" \ | ||||||
| --build-arg "QTAV_VERSION=${QTAV_VERSION}" \ | ||||||
| --build-arg "AV_VERSION=${AV_VERSION}" \ | ||||||
| --tag "alicevision/meshroom:${MESHROOM_VERSION}-av${AV_VERSION}-rocky${ROCKY_VERSION}-cuda${CUDA_VERSION}" \ | ||||||
| -f docker/Dockerfile_rocky . | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Providing a default value for
QTAV_VERSION(e.g.,develop) ensures that direct builds of the Dockerfile (without using the helper script) do not fail or result in an empty version string during the CMake configuration.