diff --git a/docker/Dockerfile_centos b/docker/Dockerfile_centos deleted file mode 100644 index 72a071a024..0000000000 --- a/docker/Dockerfile_centos +++ /dev/null @@ -1,79 +0,0 @@ -ARG MESHROOM_VERSION -ARG AV_VERSION -ARG CUDA_VERSION -ARG CENTOS_VERSION -FROM alicevision/meshroom-deps:${MESHROOM_VERSION}-av${AV_VERSION}-centos${CENTOS_VERSION}-cuda${CUDA_VERSION} -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 -p 2222:22 --name meshroom -v:/data alicevision/meshroom:develop-av2.2.8.develop-ubuntu20.04-cuda11.0 -# ssh -p 2222 -X root@ /opt/Meshroom_bundle/Meshroom # Password is 'meshroom' - -ENV MESHROOM_DEV=/opt/Meshroom \ - MESHROOM_BUILD=/tmp/Meshroom_build \ - MESHROOM_BUNDLE=/opt/Meshroom_bundle \ - AV_INSTALL=/opt/AliceVision_install \ - QT_DIR=/opt/Qt/5.15.2/gcc_64 \ - PATH="${PATH}:${MESHROOM_BUNDLE}" \ - OPENIMAGEIO_LIBRARY=/opt/AliceVision_install/lib - -COPY CMakeLists.txt ${MESHROOM_DEV}/ - -WORKDIR ${MESHROOM_BUILD} - -# Build Meshroom plugins -RUN cmake "${MESHROOM_DEV}" -DCMAKE_PREFIX_PATH="${AV_INSTALL}" -DALICEVISION_ROOT="${AV_INSTALL}" -DCMAKE_INSTALL_PREFIX="${MESHROOM_BUNDLE}/qtPlugins" - -RUN make "-j$(nproc)" QtAliceVision -RUN make "-j$(nproc)" && \ - rm -rf "${MESHROOM_BUILD}" "${MESHROOM_DEV}" \ - ${MESHROOM_BUNDLE}/aliceVision/share/doc \ - ${MESHROOM_BUNDLE}/aliceVision/share/eigen3 \ - ${MESHROOM_BUNDLE}/aliceVision/share/fonts \ - ${MESHROOM_BUNDLE}/aliceVision/share/lemon \ - ${MESHROOM_BUNDLE}/aliceVision/share/libraw \ - ${MESHROOM_BUNDLE}/aliceVision/share/man/ \ - aliceVision/share/pkgconfig - -COPY *requirements.txt *.md *.py ${MESHROOM_DEV}/ -COPY ./docs ${MESHROOM_DEV}/docs -COPY ./meshroom ${MESHROOM_DEV}/meshroom -COPY ./tests ${MESHROOM_DEV}/tests -COPY ./bin ${MESHROOM_DEV}/bin - -WORKDIR ${MESHROOM_DEV} - -# remove from default install -RUN rm meshroom/submitters/ripple* meshroom/submitters/simpleFarm* - -RUN source scl_source enable rh-python36 && \ - python setup.py install_exe -d "${MESHROOM_BUNDLE}" && \ - find ${MESHROOM_BUNDLE} -name "*Qt5Web*" -delete && \ - find ${MESHROOM_BUNDLE} -name "*Qt5Designer*" -delete && \ - rm -rf ${MESHROOM_BUNDLE}/lib/PySide2/typesystems/ \ - ${MESHROOM_BUNDLE}/lib/PySide2/examples/ \ - ${MESHROOM_BUNDLE}/lib/PySide2/include/ \ - ${MESHROOM_BUNDLE}/lib/PySide2/Qt/translations/ \ - ${MESHROOM_BUNDLE}/lib/PySide2/Qt/resources/ \ - ${MESHROOM_BUNDLE}/lib/PySide2/QtWeb* \ - ${MESHROOM_BUNDLE}/lib/PySide2/pyside2-lupdate \ - ${MESHROOM_BUNDLE}/lib/PySide2/rcc \ - ${MESHROOM_BUNDLE}/lib/PySide2/designer - -# Copy missing libassimpsceneimport.so -COPY dl/libassimpsceneimport.so ${MESHROOM_BUNDLE}/lib/PySide2/Qt/plugins/sceneparsers - -# Enable SSH X11 forwarding, needed when the Docker image -# is run on a remote machine -RUN yum -y install openssh-server xauth mesa-dri-drivers && \ - systemctl enable sshd && \ - mkdir -p /run/sshd - -RUN sed -i "s/^.*X11Forwarding.*$/X11Forwarding yes/; s/^.*X11UseLocalhost.*$/X11UseLocalhost no/; s/^.*PermitRootLogin prohibit-password/PermitRootLogin yes/; s/^.*X11UseLocalhost.*/X11UseLocalhost no/;" /etc/ssh/sshd_config -RUN echo "root:meshroom" | chpasswd - -WORKDIR /root - -EXPOSE 22 -CMD bash -c "test -s /etc/machine-id || systemd-machine-id-setup; sshd-keygen; /usr/sbin/sshd -D" - diff --git a/docker/Dockerfile_centos_deps b/docker/Dockerfile_centos_deps deleted file mode 100644 index 65a0da467d..0000000000 --- a/docker/Dockerfile_centos_deps +++ /dev/null @@ -1,67 +0,0 @@ -ARG AV_VERSION -ARG CUDA_VERSION -ARG CENTOS_VERSION=7 -FROM alicevision/alicevision:${AV_VERSION}-centos${CENTOS_VERSION}-cuda${CUDA_VERSION} -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 \ - MESHROOM_BUNDLE=/opt/Meshroom_bundle \ - QT_DIR=/opt/Qt/5.15.2/gcc_64 \ - QT_CI_LOGIN=alicevisionjunk@gmail.com \ - QT_CI_P=azerty1. - -WORKDIR ${MESHROOM_BUNDLE} -RUN mv "${AV_BUNDLE}" "${MESHROOM_BUNDLE}/aliceVision" && \ - rm -rf ${MESHROOM_BUNDLE}/aliceVision/share/doc \ - ${MESHROOM_BUNDLE}/aliceVision/share/eigen3 \ - ${MESHROOM_BUNDLE}/aliceVision/share/fonts \ - ${MESHROOM_BUNDLE}/aliceVision/share/lemon \ - ${MESHROOM_BUNDLE}/aliceVision/share/libraw \ - ${MESHROOM_BUNDLE}/aliceVision/share/man \ - ${MESHROOM_BUNDLE}/aliceVision/share/pkgconfig - -# 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 \ - xcb-util-wm \ - xcb-util-renderutil \ - libxkbcommon-x11 - -# Install Python3 -RUN yum install -y centos-release-scl && yum install -y rh-python36 && source scl_source enable rh-python36 && pip install --upgrade pip - -COPY ./*requirements.txt ${MESHROOM_DEV}/ - -# Install Meshroom requirements and freeze bundle -WORKDIR "${MESHROOM_DEV}" -RUN source scl_source enable rh-python36 && pip install -r dev_requirements.txt -r requirements.txt - -# Install Qt (to build plugins) -WORKDIR /tmp/qt -COPY dl/qt.run /tmp/qt -RUN chmod +x qt.run -RUN ./qt.run --verbose --email ${QT_CI_LOGIN} --password ${QT_CI_P} --accept-obligations --accept-licenses \ - --default-answer --platform minimal --no-force-installations --no-default-installations --confirm-command \ - install qt.qt5.5152.gcc_64 qt.qt5.5152.qtcharts qt.qt5.5152.qtcharts.gcc_64 -RUN rm qt.run diff --git a/docker/Dockerfile_rocky b/docker/Dockerfile_rocky new file mode 100644 index 0000000000..28ae2c2cf6 --- /dev/null +++ b/docker/Dockerfile_rocky @@ -0,0 +1,90 @@ +ARG MESHROOM_VERSION +ARG AV_VERSION +ARG CUDA_VERSION +ARG ROCKY_VERSION +FROM alicevision/meshroom-deps:${MESHROOM_VERSION}-av${AV_VERSION}-rocky${ROCKY_VERSION}-cuda${CUDA_VERSION} +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 -p 2222:22 --name meshroom -v:/data alicevision/meshroom:develop-av2.2.8.develop-ubuntu20.04-cuda11.0 +# ssh -p 2222 -X root@ /opt/Meshroom_bundle/Meshroom # Password is 'meshroom' + +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.6.3/gcc_64 \ + PATH="${PATH}:${MESHROOM_BUNDLE}" + +COPY *.txt *.md *.py ${MESHROOM_DEV}/ +COPY ./docs ${MESHROOM_DEV}/docs +COPY ./meshroom ${MESHROOM_DEV}/meshroom +COPY ./tests ${MESHROOM_DEV}/tests +COPY ./bin ${MESHROOM_DEV}/bin + +WORKDIR ${MESHROOM_DEV} + +RUN python3 -m pip install --upgrade --force-reinstall cx_Freeze==6.9 + +RUN python3 setup.py install_exe -d "${MESHROOM_BUNDLE}" && \ + find ${MESHROOM_BUNDLE} -name "*Qt6Web*" -delete && \ + find ${MESHROOM_BUNDLE} -name "*Qt6Designer*" -delete && \ + rm -rf ${MESHROOM_BUNDLE}/lib/PySide6/typesystems/ \ + ${MESHROOM_BUNDLE}/lib/PySide6/examples/ \ + ${MESHROOM_BUNDLE}/lib/PySide6/include/ \ + ${MESHROOM_BUNDLE}/lib/PySide6/Qt/translations/ \ + ${MESHROOM_BUNDLE}/lib/PySide6/Qt/resources/ \ + ${MESHROOM_BUNDLE}/lib/PySide6/QtWeb* \ + ${MESHROOM_BUNDLE}/lib/PySide6/rcc \ + ${MESHROOM_BUNDLE}/lib/PySide6/designer + +WORKDIR ${MESHROOM_BUILD} + +# Build Meshroom plugins +RUN cmake "${MESHROOM_DEV}" -DALICEVISION_ROOT="${AV_INSTALL}" -DCMAKE_INSTALL_PREFIX="${MESHROOM_BUNDLE}/qtPlugins" +RUN make "-j$(nproc)" QtAliceVision +RUN make "-j$(nproc)" && \ + rm -rf "${MESHROOM_BUILD}" "${MESHROOM_DEV}" \ + ${MESHROOM_BUNDLE}/aliceVision/share/doc \ + ${MESHROOM_BUNDLE}/aliceVision/share/eigen3 \ + ${MESHROOM_BUNDLE}/aliceVision/share/fonts \ + ${MESHROOM_BUNDLE}/aliceVision/share/lemon \ + ${MESHROOM_BUNDLE}/aliceVision/share/libraw \ + ${MESHROOM_BUNDLE}/aliceVision/share/man/ \ + aliceVision/share/pkgconfig + +# Download meshroomNodes and the models, install the requirements and set all the variables +WORKDIR ${MESHROOM_BUNDLE} +RUN git clone https://github.com/alicevision/meshroomNodes.git meshroomNodes +RUN pip install --upgrade setuptools +RUN pip install -r meshroomNodes/requirements.txt +RUN rm meshroomNodes/requirements.txt meshroomNodes/setup.py +ENV MESHROOM_NODES_PATH="${MESHROOM_BUNDLE}/meshroomNodes/meshroom/nodes" +ENV PYTHONPATH="${PYTHONPATH}:${MESHROOM_BUNDLE}/meshroomNodes" + +RUN git clone https://gitlab.com/alicevision/imagepromptnnmodels.git imagePromptNNModels +RUN rm imagePromptNNModels/.gitattributes +ENV RDS_RECOGNITION_MODEL_PATH="${MESHROOM_BUNDLE}/imagePromptNNModels/models/ram_plus_swin_large_14m.pth" +ENV RDS_DETECTION_CONFIG_PATH="${MESHROOM_BUNDLE}/imagePromptNNModels/models/models/GroundingDINO_SwinT_OGC.py" +ENV RDS_DETECTION_MODEL_PATH="${MESHROOM_BUNDLE}/imagePromptNNModels/models/groundingdino_swint_ogc.pth" +ENV RDS_SEGMENTATION_MODEL_PATH="${MESHROOM_BUNDLE}/imagePromptNNModels/models/sam_vit_h_4b8939.pth" +ENV RDS_TOKENIZER_PATH="${MESHROOM_BUNDLE}/imagePromptNNModels/models/tokenizer" +ENV TRANSFORMERS_OFFLINE="TRUE" + +# Enable SSH X11 forwarding, needed when the Docker image +# is run on a remote machine +RUN dnf install -y openssh openssh-clients openssh-server xorg-x11-xauth +RUN systemctl enable sshd && \ + mkdir -p /run/sshd && \ + ssh-keygen -A + +RUN sed -i "s/^.*X11Forwarding.*$/X11Forwarding yes/; s/^.*X11UseLocalhost.*$/X11UseLocalhost no/; s/^.*PermitRootLogin prohibit-password/PermitRootLogin yes/; s/^.*X11UseLocalhost.*/X11UseLocalhost no/;" /etc/ssh/sshd_config +RUN echo "root:meshroom" | chpasswd + +WORKDIR /root + +EXPOSE 22 +CMD ["/usr/sbin/sshd", "-D"] + diff --git a/docker/Dockerfile_rocky_deps b/docker/Dockerfile_rocky_deps new file mode 100644 index 0000000000..c8cae0c732 --- /dev/null +++ b/docker/Dockerfile_rocky_deps @@ -0,0 +1,46 @@ +ARG AV_VERSION +ARG CUDA_VERSION +ARG ROCKY_VERSION +FROM alicevision/alicevision:${AV_VERSION}-rocky${ROCKY_VERSION}-cuda${CUDA_VERSION} +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.6.3/gcc_64 \ + QT_CI_LOGIN=alicevisionjunk@gmail.com \ + QT_CI_P=azerty1. + +# Install libs needed by Qt +RUN dnf update -y +RUN dnf install -y flex fontconfig freetype +RUN dnf install -y 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 zlib-devel systemd openssh-server +RUN dnf install -y libxcb-devel \ + libxkbcommon-devel \ + libxkbcommon-x11-devel \ + xcb-util-wm xcb-util-image \ + xcb-util-keysyms \ + xcb-util-renderutil + +# Install Qt (to build plugins) +WORKDIR /tmp/qt +COPY dl/qt.run /tmp/qt +RUN chmod +x qt.run +RUN ./qt.run --verbose --email ${QT_CI_LOGIN} --password ${QT_CI_P} --accept-obligations --accept-licenses \ + --default-answer --platform minimal --auto-answer installationErrorWithCancel=Ignore --no-force-installations --no-default-installations --confirm-command \ + install qt.qt6.663.gcc_64 qt.qt6.663.addons.qtcharts qt.qt6.663.addons.qt3d +RUN rm qt.run + +# Strip sections containing ".note.ABI.tag" from .so: https://github.com/Microsoft/WSL/issues/3023 +RUN find ${QT_DIR}/lib/ -name '*.so' | xargs strip --remove-section=.note.ABI-tag + +COPY ./*requirements.txt ./setup.py ${MESHROOM_DEV}/ + +# Install Meshroom requirements and freeze bundle +WORKDIR "${MESHROOM_DEV}" +RUN python3 -m pip install -r dev_requirements.txt -r requirements.txt diff --git a/docker/Dockerfile_ubuntu b/docker/Dockerfile_ubuntu index c8bc8f7ab3..7878eced15 100644 --- a/docker/Dockerfile_ubuntu +++ b/docker/Dockerfile_ubuntu @@ -13,9 +13,8 @@ ENV MESHROOM_DEV=/opt/Meshroom \ MESHROOM_BUILD=/tmp/Meshroom_build \ MESHROOM_BUNDLE=/opt/Meshroom_bundle \ AV_INSTALL=/opt/AliceVision_install \ - QT_DIR=/opt/Qt/5.15.2/gcc_64 \ - PATH="${PATH}:${MESHROOM_BUNDLE}" \ - OPENIMAGEIO_LIBRARY=/opt/AliceVision_install/lib + QT_DIR=/opt/Qt/6.6.3/gcc_64 \ + PATH="${PATH}:${MESHROOM_BUNDLE}" COPY *.txt *.md *.py ${MESHROOM_DEV}/ COPY ./docs ${MESHROOM_DEV}/docs @@ -26,17 +25,16 @@ COPY ./bin ${MESHROOM_DEV}/bin WORKDIR ${MESHROOM_DEV} RUN python3 setup.py install_exe -d "${MESHROOM_BUNDLE}" && \ - find ${MESHROOM_BUNDLE} -name "*Qt5Web*" -delete && \ - find ${MESHROOM_BUNDLE} -name "*Qt5Designer*" -delete && \ - rm -rf ${MESHROOM_BUNDLE}/lib/PySide2/typesystems/ \ - ${MESHROOM_BUNDLE}/lib/PySide2/examples/ \ - ${MESHROOM_BUNDLE}/lib/PySide2/include/ \ - ${MESHROOM_BUNDLE}/lib/PySide2/Qt/translations/ \ - ${MESHROOM_BUNDLE}/lib/PySide2/Qt/resources/ \ - ${MESHROOM_BUNDLE}/lib/PySide2/QtWeb* \ - ${MESHROOM_BUNDLE}/lib/PySide2/pyside2-lupdate \ - ${MESHROOM_BUNDLE}/lib/PySide2/rcc \ - ${MESHROOM_BUNDLE}/lib/PySide2/designer + find ${MESHROOM_BUNDLE} -name "*Qt6Web*" -delete && \ + find ${MESHROOM_BUNDLE} -name "*Qt6Designer*" -delete && \ + rm -rf ${MESHROOM_BUNDLE}/lib/PySide6/typesystems/ \ + ${MESHROOM_BUNDLE}/lib/PySide6/examples/ \ + ${MESHROOM_BUNDLE}/lib/PySide6/include/ \ + ${MESHROOM_BUNDLE}/lib/PySide6/Qt/translations/ \ + ${MESHROOM_BUNDLE}/lib/PySide6/Qt/resources/ \ + ${MESHROOM_BUNDLE}/lib/PySide6/QtWeb* \ + ${MESHROOM_BUNDLE}/lib/PySide6/rcc \ + ${MESHROOM_BUNDLE}/lib/PySide6/designer WORKDIR ${MESHROOM_BUILD} @@ -53,8 +51,23 @@ RUN make "-j$(nproc)" && \ ${MESHROOM_BUNDLE}/aliceVision/share/man/ \ aliceVision/share/pkgconfig -# Copy missing libassimpsceneimport.so -COPY dl/libassimpsceneimport.so ${MESHROOM_BUNDLE}/lib/PySide2/Qt/plugins/sceneparsers +# Download meshroomNodes and the models, install the requirements and set all the variables +WORKDIR ${MESHROOM_BUNDLE} +RUN git clone https://github.com/alicevision/meshroomNodes.git meshroomNodes +RUN pip install --upgrade setuptools +RUN pip install -r meshroomNodes/requirements.txt +RUN rm meshroomNodes/requirements.txt meshroomNodes/setup.py +ENV MESHROOM_NODES_PATH="${MESHROOM_BUNDLE}/meshroomNodes/meshroom/nodes" +ENV PYTHONPATH="${PYTHONPATH}:${MESHROOM_BUNDLE}/meshroomNodes" + +RUN git clone https://gitlab.com/alicevision/imagepromptnnmodels.git imagePromptNNModels +RUN rm imagePromptNNModels/.gitattributes +ENV RDS_RECOGNITION_MODEL_PATH="${MESHROOM_BUNDLE}/imagePromptNNModels/models/ram_plus_swin_large_14m.pth" +ENV RDS_DETECTION_CONFIG_PATH="${MESHROOM_BUNDLE}/imagePromptNNModels/models/models/GroundingDINO_SwinT_OGC.py" +ENV RDS_DETECTION_MODEL_PATH="${MESHROOM_BUNDLE}/imagePromptNNModels/models/groundingdino_swint_ogc.pth" +ENV RDS_SEGMENTATION_MODEL_PATH="${MESHROOM_BUNDLE}/imagePromptNNModels/models/sam_vit_h_4b8939.pth" +ENV RDS_TOKENIZER_PATH="${MESHROOM_BUNDLE}/imagePromptNNModels/models/tokenizer" +ENV TRANSFORMERS_OFFLINE="TRUE" # Enable SSH X11 forwarding, needed when the Docker image # is run on a remote machine @@ -69,4 +82,3 @@ WORKDIR /root EXPOSE 22 CMD ["/usr/sbin/sshd", "-D"] - diff --git a/docker/Dockerfile_ubuntu_deps b/docker/Dockerfile_ubuntu_deps index 2e77093bd5..51b269236c 100644 --- a/docker/Dockerfile_ubuntu_deps +++ b/docker/Dockerfile_ubuntu_deps @@ -9,13 +9,10 @@ LABEL maintainer="AliceVision Team alicevision-team@googlegroups.com" ENV MESHROOM_DEV=/opt/Meshroom \ MESHROOM_BUILD=/tmp/Meshroom_build \ - QT_DIR=/opt/Qt/5.15.2/gcc_64 \ + QT_DIR=/opt/Qt/6.6.3/gcc_64 \ QT_CI_LOGIN=alicevisionjunk@gmail.com \ QT_CI_P=azerty1. -# Workaround for QtAliceVision builds: fuse lib/lib64 folders -#RUN ln -s ${AV_INSTALL}/lib ${AV_INSTALL}/lib64 - # Install libs needed by Qt RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \ @@ -29,19 +26,29 @@ RUN apt-get update && \ libxext6 \ libxi6 \ libxrender1 \ - libsm6 \ + libsm6 + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \ libxt-dev \ - libglu-dev \ libosmesa-dev \ libgl-dev \ + libegl-dev \ libglu-dev \ - libqt5charts5-dev \ + libxkbcommon-x11-0 \ + libz-dev \ + systemd \ + ssh + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \ + libxcb1-dev \ + libxcb-icccm4 \ + libxcb-render-util0 \ + libxcb-shape0 \ libxcb-keysyms1 \ libxcb-image0 \ - libxkbcommon-x11-0 \ - libz-dev \ - systemd \ - ssh + libxkbcommon-dev RUN apt-get install -y --no-install-recommends \ software-properties-common @@ -54,13 +61,15 @@ WORKDIR /tmp/qt COPY dl/qt.run /tmp/qt RUN chmod +x qt.run RUN ./qt.run --verbose --email ${QT_CI_LOGIN} --password ${QT_CI_P} --accept-obligations --accept-licenses \ - --default-answer --platform minimal --no-force-installations --no-default-installations --confirm-command \ - install qt.qt5.5152.gcc_64 qt.qt5.5152.qtcharts qt.qt5.5152.qtcharts.gcc_64 + --default-answer --platform minimal --auto-answer installationErrorWithCancel=Ignore --no-force-installations --no-default-installations --confirm-command \ + install qt.qt6.663.gcc_64 qt.qt6.663.addons.qtcharts qt.qt6.663.addons.qt3d RUN rm qt.run +# Strip sections containing ".note.ABI.tag" from .so: https://github.com/Microsoft/WSL/issues/3023 +RUN find ${QT_DIR}/lib/ -name '*.so' | xargs strip --remove-section=.note.ABI-tag + COPY ./*requirements.txt ./setup.py ${MESHROOM_DEV}/ # Install Meshroom requirements and freeze bundle WORKDIR "${MESHROOM_DEV}" RUN pip install -r dev_requirements.txt -r requirements.txt - diff --git a/docker/build-all.sh b/docker/build-all.sh index 006a614687..3bfb57a0ad 100755 --- a/docker/build-all.sh +++ b/docker/build-all.sh @@ -7,10 +7,6 @@ test -d docker || ( exit 1 ) -CUDA_VERSION=11.0 UBUNTU_VERSION=20.04 docker/build-ubuntu.sh -CUDA_VERSION=11.0 UBUNTU_VERSION=18.04 docker/build-ubuntu.sh -CUDA_VERSION=10.2 UBUNTU_VERSION=18.04 docker/build-ubuntu.sh -CUDA_VERSION=9.2 UBUNTU_VERSION=18.04 docker/build-ubuntu.sh +CUDA_VERSION=12.1.0 UBUNTU_VERSION=22.04 docker/build-ubuntu.sh -CUDA_VERSION=10.2 CENTOS_VERSION=7 docker/build-centos.sh -CUDA_VERSION=9.2 CENTOS_VERSION=7 docker/build-centos.sh +CUDA_VERSION=12.1.0 ROCKY_VERSION=9 docker/build-rocky.sh \ No newline at end of file diff --git a/docker/build-centos.sh b/docker/build-centos.sh deleted file mode 100755 index 41c0988dc0..0000000000 --- a/docker/build-centos.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -set -ex - - -test -z "$MESHROOM_VERSION" && MESHROOM_VERSION="$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD)" -echo "MESHROOM_VERSION=${MESHROOM_VERSION}" - -test -z "$CUDA_VERSION" && CUDA_VERSION="11.3.1" -echo "CUDA_VERSION=${CUDA_VERSION}" - -test -z "$CENTOS_VERSION" && CENTOS_VERSION="7" -echo "CENTOS_VERSION=${CENTOS_VERSION}" - -test -z "$AV_VERSION" && echo "AliceVision version not specified, set AV_VERSION in the environment" && exit 1 -echo "AV_VERSION=${AV_VERSION}" - -test -d docker || ( - echo This script must be run from the top level Meshroom directory - 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-unified-linux-x64-online.run" -O "dl/qt.run" - -# Download a prebuilt assimp importer to address https://bugreports.qt.io/browse/QTBUG-88821 -test -f dl/libassimpsceneimport.so || \ - wget --no-check-certificate "https://drive.google.com/uc?export=download&id=1cTU7xrOsLI6ICgRSYz_t9E1lsrNF1kBB" -O "dl/libassimpsceneimport.so" - - -# DEPENDENCIES - -DEPS_DOCKER_TAG=alicevision/meshroom-deps:${MESHROOM_VERSION}-av${AV_VERSION}-centos${CENTOS_VERSION}-cuda${CUDA_VERSION} - -docker build \ - --rm \ - --build-arg "CUDA_VERSION=${CUDA_VERSION}" \ - --build-arg "CENTOS_VERSION=${CENTOS_VERSION}" \ - --build-arg "AV_VERSION=${AV_VERSION}" \ - --tag ${DEPS_DOCKER_TAG} \ - -f docker/Dockerfile_centos_deps . - -# Meshroom - -DOCKER_TAG=alicevision/meshroom:${MESHROOM_VERSION}-av${AV_VERSION}-centos${CENTOS_VERSION}-cuda${CUDA_VERSION} - -docker build \ - --rm \ - --build-arg "MESHROOM_VERSION=${MESHROOM_VERSION}" \ - --build-arg "CUDA_VERSION=${CUDA_VERSION}" \ - --build-arg "CENTOS_VERSION=${CENTOS_VERSION}" \ - --build-arg "AV_VERSION=${AV_VERSION}" \ - --tag ${DOCKER_TAG} \ - -f docker/Dockerfile_centos . - -echo "" -echo " To upload results:" -echo "" -echo "docker push ${DEPS_DOCKER_TAG}" -echo "docker push ${DOCKER_TAG}" -echo "" diff --git a/docker/build-rocky.sh b/docker/build-rocky.sh new file mode 100755 index 0000000000..de5bdac889 --- /dev/null +++ b/docker/build-rocky.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -e + +test -z "$MESHROOM_VERSION" && MESHROOM_VERSION="$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD)" +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.0 +test -z "$ROCKY_VERSION" && ROCKY_VERSION=9 + +test -d docker || ( + echo This script must be run from the top level Meshroom directory + 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-unified-linux-x64-online.run" -O "dl/qt.run" + +# DEPENDENCIES +docker build \ + --rm \ + --build-arg "CUDA_VERSION=${CUDA_VERSION}" \ + --build-arg "ROCKY_VERSION=${ROCKY_VERSION}" \ + --build-arg "AV_VERSION=${AV_VERSION}" \ + --tag "alicevision/meshroom-deps:${MESHROOM_VERSION}-av${AV_VERSION}-rocky${ROCKY_VERSION}-cuda${CUDA_VERSION}" \ + -f docker/Dockerfile_rocky_deps . + +# Meshroom +docker build \ + --rm \ + --build-arg "MESHROOM_VERSION=${MESHROOM_VERSION}" \ + --build-arg "CUDA_VERSION=${CUDA_VERSION}" \ + --build-arg "ROCKY_VERSION=${ROCKY_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 . + diff --git a/docker/build-ubuntu.sh b/docker/build-ubuntu.sh index bc26ab2b0a..74152b7c63 100755 --- a/docker/build-ubuntu.sh +++ b/docker/build-ubuntu.sh @@ -3,22 +3,18 @@ set -e test -z "$MESHROOM_VERSION" && MESHROOM_VERSION="$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD)" test -z "$AV_VERSION" && echo "AliceVision version not specified, set AV_VERSION in the environment" && exit 1 -test -z "$CUDA_VERSION" && CUDA_VERSION=11.3.1 -test -z "$UBUNTU_VERSION" && UBUNTU_VERSION=20.04 +test -z "$CUDA_VERSION" && CUDA_VERSION=12.1.0 +test -z "$UBUNTU_VERSION" && UBUNTU_VERSION=22.04 test -d docker || ( - echo This script must be run from the top level Meshroom directory + echo This script must be run from the top level Meshroom directory 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-unified-linux-x64-online.run" -O "dl/qt.run" - -# Download a prebuilt assimp importer to address https://bugreports.qt.io/browse/QTBUG-88821 -test -f dl/libassimpsceneimport.so || \ - wget --no-check-certificate "https://drive.google.com/uc?export=download&id=1cTU7xrOsLI6ICgRSYz_t9E1lsrNF1kBB" -O "dl/libassimpsceneimport.so" + wget --no-check-certificate "https://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run" -O "dl/qt.run" # DEPENDENCIES docker build \ diff --git a/docker/extract-rocky.sh b/docker/extract-rocky.sh new file mode 100755 index 0000000000..87a81d1991 --- /dev/null +++ b/docker/extract-rocky.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -ex + +test -z "$MESHROOM_VERSION" && MESHROOM_VERSION="$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD)" +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.0" +test -z "$ROCKY_VERSION" && ROCKY_VERSION="9" + +test -d docker || ( + echo This script must be run from the top level Meshroom directory + exit 1 +) + +VERSION_NAME=${MESHROOM_VERSION}-av${AV_VERSION}-rocky${ROCKY_VERSION}-cuda${CUDA_VERSION} + +# Retrieve the Meshroom bundle folder +rm -rf ./Meshroom-${VERSION_NAME} +CID=$(docker create alicevision/meshroom:${VERSION_NAME}) +docker cp ${CID}:/opt/Meshroom_bundle ./Meshroom-${VERSION_NAME} +docker rm ${CID} + diff --git a/docker/extract.sh b/docker/extract-ubuntu.sh similarity index 78% rename from docker/extract.sh rename to docker/extract-ubuntu.sh index 541227db24..ac078f2dc4 100755 --- a/docker/extract.sh +++ b/docker/extract-ubuntu.sh @@ -3,15 +3,15 @@ set -ex test -z "$MESHROOM_VERSION" && MESHROOM_VERSION="$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD)" test -z "$AV_VERSION" && echo "AliceVision version not specified, set AV_VERSION in the environment" && exit 1 -test -z "$CUDA_VERSION" && CUDA_VERSION="11.3.1" -test -z "$CENTOS_VERSION" && CENTOS_VERSION="7" +test -z "$CUDA_VERSION" && CUDA_VERSION="12.1.0" +test -z "$UBUNTU_VERSION" && UBUNTU_VERSION="22.04" test -d docker || ( echo This script must be run from the top level Meshroom directory exit 1 ) -VERSION_NAME=${MESHROOM_VERSION}-av${AV_VERSION}-centos${CENTOS_VERSION}-cuda${CUDA_VERSION} +VERSION_NAME=${MESHROOM_VERSION}-av${AV_VERSION}-ubuntu${UBUNTU_VERSION}-cuda${CUDA_VERSION} # Retrieve the Meshroom bundle folder rm -rf ./Meshroom-${VERSION_NAME}