-
-
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 all 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,11 @@ 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 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 | ||
|
|
@@ -45,8 +45,11 @@ WORKDIR ${MESHROOM_BUILD} | |
| RUN mkdir ${MESHROOM_BUNDLE}/aliceVision && \ | ||
| mv /opt/AliceVision_bundle/* ${MESHROOM_BUNDLE}/aliceVision | ||
|
|
||
| # PySide6: copy missing libQt63DQuickScene3D.so along with its dependencies to avoid runtime issues | ||
| RUN cp ${QT_ROOT}/lib/libQt63DQuickScene3D.so.6.8.3 ${MESHROOM_BUNDLE}/lib/PySide6/Qt/lib/libQt63DQuickScene3D.so.6 | ||
|
|
||
| # Build Meshroom plugins | ||
| RUN cmake "${MESHROOM_DEV}" -DALICEVISION_ROOT="${AV_INSTALL}" -DCMAKE_INSTALL_PREFIX="${MESHROOM_BUNDLE}/qtPlugins" | ||
| RUN cmake "${MESHROOM_DEV}" -DQT_DIR=${QT_ROOT} -DALICEVISION_ROOT="${AV_INSTALL}" -DQTALICEVISION_VERSION=${QTAV_VERSION} -DCMAKE_INSTALL_PREFIX="${MESHROOM_BUNDLE}/qtPlugins" | ||
| RUN make "-j$(nproc)" QtAliceVision | ||
| RUN make "-j$(nproc)" && \ | ||
| rm -rf "${MESHROOM_BUILD}" "${MESHROOM_DEV}" \ | ||
|
|
@@ -58,16 +61,6 @@ RUN make "-j$(nproc)" && \ | |
| ${MESHROOM_BUNDLE}/aliceVision/share/man/ \ | ||
| 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 | ||
|
|
||
| # 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 | ||
| RUN mv ${MESHROOM_BUNDLE}/lib/libOpenGL.so.0.0.0 ${MESHROOM_BUNDLE}/lib/libOpenGL.so.0 | ||
|
|
@@ -86,4 +79,3 @@ WORKDIR /root | |
|
|
||
| EXPOSE 22 | ||
| CMD ["/usr/sbin/sshd", "-D"] | ||
|
|
||
| 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 "$MESHROOM_VERSION" && MESHROOM_VERSION="$(git rev-parse --abbrev-ref HEAD | tr '/' '.')-$(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 | ||||||
|
|
@@ -11,11 +12,6 @@ test -d docker || ( | |||||
| exit 1 | ||||||
| ) | ||||||
|
|
||||||
| test -d dl || \ | ||||||
| mkdir dl | ||||||
| test -f dl/qt.run || \ | ||||||
| wget --no-check-certificate "https://download.qt.io/official_releases/online_installers/qt-online-installer-linux-x64-online.run" -O "dl/qt.run" | ||||||
|
|
||||||
| # DEPENDENCIES | ||||||
| docker build \ | ||||||
| --rm \ | ||||||
|
|
@@ -33,6 +29,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.