Skip to content

how to run meshroom in command line in the 2025.1.0 version ? #2956

@mathieubellanger

Description

@mathieubellanger

I try to build a docker image for meshroom 2025.1.1 for arm64 and command line operation
That's fine.

I build this image :

deps

ARG CUDA_VERSION=12.1.1
ARG UBUNTU_VERSION=22.04
FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}

LABEL maintainer="AliceVision DGX User"
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget software-properties-common build-essential git unzip yasm pkg-config libtool libssl-dev nasm automake clang-format libxerces-c-dev libpcre2-dev bison flex texinfo libyaml-cpp-dev gcc-12 g++-12 cpp-12 gfortran-12 && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12 --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-12

RUN wget https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2-linux-aarch64.sh -q -O /tmp/cmake-install.sh && chmod u+x /tmp/cmake-install.sh && /tmp/cmake-install.sh --skip-license --prefix=/usr/local && rm /tmp/cmake-install.sh

RUN add-apt-repository ppa:deadsnakes/ppa && apt-get update && apt-get install -y --no-install-recommends python3.11 python3.11-dev python3.11-distutils curl && curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11
RUN python3.11 -m pip install "numpy==1.*"

ENV AV_BUNDLE=/opt/AliceVision_bundle
ENV AV_DEV=/opt/AliceVision_git AV_BUILD=/tmp/AliceVision_build AV_INSTALL=/opt/AliceVision_install PATH="${PATH}:${AV_BUNDLE}"

COPY dl/vlfeat_K80L3.SIFT.tree ${AV_INSTALL}/share/aliceVision/
RUN echo "export ALICEVISION_VOCTREE=${AV_INSTALL}/share/aliceVision/vlfeat_K80L3.SIFT.tree" >> /etc/profile.d/alicevision.sh
COPY dl/sphereDetection_Mask-RCNN.onnx ${AV_INSTALL}/share/aliceVision/
RUN echo "export ALICEVISION_SPHERE_DETECTION_MODEL=${AV_INSTALL}/share/aliceVision/sphereDetection_Mask-RCNN.onnx" >> /etc/profile.d/alicevision.sh
COPY dl/fcn_resnet50.onnx ${AV_INSTALL}/share/aliceVision/
RUN echo "export ALICEVISION_SEMANTIC_SEGMENTATION_MODEL=${AV_INSTALL}/share/aliceVision/fcn_resnet50.onnx" >> /etc/profile.d/alicevision.sh
COPY dl/ColorChartDetectionModel ${AV_INSTALL}/share/aliceVision/ColorChartDetectionModel
RUN echo "export ALICEVISION_COLORCHARTDETECTION_MODEL_FOLDER=${AV_INSTALL}/share/aliceVision/ColorChartDetectionModel" >> /etc/profile.d/alicevision.sh

COPY docker/check-cpu.sh ${AV_DEV}/docker/check-cpu.sh
RUN export CPU_CORES=${AV_DEV}/docker/check-cpu.sh && echo "Cores: ${CPU_CORES}"

COPY CMakeLists.txt ${AV_DEV}/
COPY src/cmake/Dependencies.cmake ${AV_DEV}/src/cmake/
COPY src ${AV_DEV}/src
COPY dl/deps ${AV_BUILD}/external/download/

WORKDIR "${AV_BUILD}"

RUN find ${AV_DEV} -name ".cmake" -exec sed -i 's/-msse[0-9]//g' {} + && find ${AV_DEV} -name "*.cmake" -exec sed -i 's/-mfpmath=sse//g' {} +

RUN cmake "${AV_DEV}" -DCMAKE_BUILD_TYPE=Release -DALICEVISION_BUILD_DEPENDENCIES:BOOL=ON -DAV_BUILD_ZLIB:BOOL=ON -DAV_BUILD_PYBIND11:BOOL=ON -DAV_BUILD_ALICEVISION:BOOL=OFF -DPython_EXECUTABLE=/usr/bin/python3.11 -DCMAKE_INSTALL_PREFIX="${AV_INSTALL}"

RUN mkdir -p "${AV_INSTALL}/lib" && ln -s lib "${AV_INSTALL}/lib64"
RUN ln -s /usr/bin/python3.11 /usr/bin/python
RUN test -e /usr/local/cuda/lib64/libcublas.so || ln -s /usr/lib/aarch64-linux-gnu/libcublas.so /usr/local/cuda/lib64/libcublas.so

RUN cmake --build . -j ${CPU_CORES} && mv "${AV_INSTALL}/bin" "${AV_INSTALL}/bin-deps" && rm -rf "${AV_BUILD}"

and this one:

meshroom

FROM my-alicevision-deps:latest

LABEL maintainer="AliceVision ARM Fusion"
ARG TARGET_ARCHITECTURE=native

ENV AV_DEV=/opt/AliceVision_git
AV_BUILD=/tmp/AliceVision_build
AV_INSTALL=/opt/AliceVision_install
AV_BUNDLE=/opt/AliceVision_bundle
MESHROOM_INSTALL=/opt/Meshroom
# IMPORTANT : On force Python 3.11 car c'est lui qui réussit le build
PYTHON_EXEC=python3.11
VERBOSE=1

WORKDIR /tmp

RUN rm -rf ${AV_DEV}
RUN git clone --recursive --branch v2025.1.0 https://github.com/alicevision/AliceVision.git ${AV_DEV} ||
git clone --recursive https://github.com/alicevision/AliceVision.git ${AV_DEV}

WORKDIR "${AV_BUILD}"

RUN mkdir -p ${AV_DEV}/meshroom
RUN find ${AV_DEV}/src/nonFree/sift/vl -name "sse2.c" -type f -exec sh -c 'echo "/ SSE2 DISABLED FOR ARM /" > {}' ;
RUN wget https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h -O ${AV_DEV}/src/aliceVision/feature/sse2neon.h
RUN find ${AV_DEV}/src -type f ( -name "
.hpp" -o -name ".cpp" -o -name ".h" ) -exec sed -i 's/#include <xmmintrin.h>/#include "aliceVision/feature/sse2neon.h"/g' {} + &&
find ${AV_DEV}/src -type f ( -name ".hpp" -o -name ".cpp" -o -name ".h" ) -exec sed -i 's/#include <emmintrin.h>/#include "aliceVision/feature/sse2neon.h"/g' {} + &&
find ${AV_DEV}/src -type f ( -name "
.hpp" -o -name ".cpp" -o -name ".h" ) -exec sed -i 's/#include <pmmintrin.h>/#include "aliceVision/feature/sse2neon.h"/g' {} + &&
find ${AV_DEV}/src -type f ( -name ".hpp" -o -name ".cpp" -o -name ".h" ) -exec sed -i 's/#include <tmmintrin.h>/#include "aliceVision/feature/sse2neon.h"/g' {} +
RUN find ${AV_DEV} -name "
.cmake" -exec sed -i 's/-msse[0-9]//g' {} + &&
find ${AV_DEV} -name "
.cmake" -exec sed -i 's/-mfpmath=sse//g' {} +

RUN /usr/local/bin/cmake "${AV_DEV}"
-DCMAKE_BUILD_TYPE=Release
-DBUILD_SHARED_LIBS:BOOL=ON
-DTARGET_ARCHITECTURE=${TARGET_ARCHITECTURE}
-DALICEVISION_BUILD_DEPENDENCIES:BOOL=OFF
-DCMAKE_PREFIX_PATH:PATH="/opt/AliceVision_install"
-DCMAKE_INSTALL_PREFIX:PATH="/opt/AliceVision_install"
-DALICEVISION_BUNDLE_PREFIX="/opt/AliceVision_bundle"
-DALICEVISION_USE_ALEMBIC:BOOL=ON
-DMINIGLOG:BOOL=ON
-DALICEVISION_USE_CCTAG:BOOL=ON
-DALICEVISION_USE_OPENCV:BOOL=ON
-DALICEVISION_USE_POPSIFT:BOOL=ON
-DALICEVISION_USE_CUDA:BOOL=ON
-DALICEVISION_USE_ONNX_GPU:BOOL=ON
-DALICEVISION_BUILD_DOC:BOOL=OFF
-DALICEVISION_BUILD_SWIG_BINDING:BOOL=ON
-DVL_DISABLE_SSE2=ON
-DCMAKE_C_FLAGS="-DVL_DISABLE_SSE2 -DVL_DISABLE_AVX -D__ARM_NEON"
-DCMAKE_CXX_FLAGS="-DVL_DISABLE_SSE2 -DVL_DISABLE_AVX -D__ARM_NEON"
-DSWIG_DIR:PATH="/opt/AliceVision_install/share/swig/4.3.0"
-DSWIG_EXECUTABLE:PATH="/opt/AliceVision_install/bin-deps/swig"
# ON FORCE LE PYTHON 3.11 ICI
-DPython3_EXECUTABLE:PATH=/usr/bin/python3.11
&& make install -jnproc
&& make bundle
&& rm -rf "${AV_BUILD}" "${AV_DEV}"

RUN rm -f ${AV_BUNDLE}/share/aliceVision/cameraSensors.db
&& mkdir -p ${AV_BUNDLE}/share/aliceVision
&& wget -O ${AV_BUNDLE}/share/aliceVision/cameraSensors.db https://github.com/alicevision/AliceVision/raw/develop/src/aliceVision/sensorDB/cameraSensors.db

WORKDIR /opt
RUN git clone --branch v2025.1.1 https://github.com/alicevision/Meshroom.git ${MESHROOM_INSTALL}
WORKDIR ${MESHROOM_INSTALL}
RUN sed -i 's/PySide6==6.8.3/PySide6>=6.6.0/g' requirements.txt

RUN ${PYTHON_EXEC} -m pip install -r requirements.txt &&
${PYTHON_EXEC} -m pip install psutil
RUN mkdir -p ${MESHROOM_INSTALL}/meshroom/aliceVision &&
# On copie le contenu du bundle (bin, lib, share) DANS le dossier python
cp -r ${AV_BUNDLE}/* ${MESHROOM_INSTALL}/meshroom/aliceVision/

ENV ALICEVISION_ROOT=${MESHROOM_INSTALL}/meshroom/aliceVision
ENV ALICEVISION_SENSOR_DB=${ALICEVISION_ROOT}/share/aliceVision/cameraSensors.db

ENV MESHROOM_ALICEVISION_DIR=${ALICEVISION_ROOT}

ENV LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
ENV PATH=${ALICEVISION_ROOT}/bin:${MESHROOM_INSTALL}/bin:${PATH}

ENV PYTHONPATH=${MESHROOM_INSTALL}:${ALICEVISION_ROOT}/lib/python3.11/site-packages

ENV QT_QPA_PLATFORM=offscreen

ENTRYPOINT ["python3.11", "/opt/Meshroom/bin/meshroom_batch"]

run the docker

but when i try to run :

docker run --gpus all --rm -v "$(pwd)":/input -v "$(pwd)/../Meshroom_out":/output --entrypoint /bin/bash meshroom-2025-arm -c "
python3.11 /opt/Meshroom/bin/meshroom_batch
--input /input
--output /output
-p "photogrammetry"
--forceCompute
"

my problem

I always have a problem of file or node if i download an old photogrammetry.md files :
Traceback (most recent call last):
File "/opt/Meshroom/bin/meshroom_batch", line 179, in
graph.initFromTemplate(args.pipeline, copyOutputs=True if args.output else False)
File "/opt/Meshroom/meshroom/core/graph.py", line 270, in initFromTemplate
self._deserialize(Graph._loadGraphData(filepath))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/Meshroom/meshroom/core/graph.py", line 285, in _loadGraphData
with open(filepath) as file:
^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'photogrammetry'

or
[2025-12-14 20:51:04,638][WARNING] Compatibility issue detected for node 'Publish_1': UnknownNodeType
[2025-12-14 20:51:04,638][WARNING] Compatibility issue detected for node 'Texturing_1': UnknownNodeType
[2025-12-14 20:51:04,638][WARNING] Compatibility issue detected for node 'Meshing_1': UnknownNodeType
[2025-12-14 20:51:04,638][WARNING] Compatibility issue detected for node 'DepthMapFilter_1': UnknownNodeType
[2025-12-14 20:51:04,638][WARNING] Compatibility issue detected for node 'ImageMatching_1': UnknownNodeType
[2025-12-14 20:51:04,638][WARNING] Compatibility issue detected for node 'FeatureExtraction_1': UnknownNodeType
[2025-12-14 20:51:04,638][WARNING] Compatibility issue detected for node 'StructureFromMotion_1': UnknownNodeType
[2025-12-14 20:51:04,639][WARNING] Compatibility issue detected for node 'PrepareDenseScene_1': UnknownNodeType
[2025-12-14 20:51:04,639][WARNING] Compatibility issue detected for node 'CameraInit_1': UnknownNodeType
[2025-12-14 20:51:04,639][WARNING] Compatibility issue detected for node 'DepthMap_1': UnknownNodeType
[2025-12-14 20:51:04,639][WARNING] Compatibility issue detected for node 'MeshFiltering_1': UnknownNodeType
[2025-12-14 20:51:04,639][WARNING] Compatibility issue detected for node 'FeatureMatching_1': UnknownNodeType
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{Texturing_1.outputMesh}"
Error: "'outputMesh'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{Texturing_1.outputMaterial}"
Error: "'outputMaterial'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{Texturing_1.outputTextures}"
Error: "'outputTextures'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{Meshing_1.output}"
Error: "'output'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{MeshFiltering_1.outputMesh}"
Error: "'outputMesh'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{DepthMapFilter_1.output}"
Error: "'output'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{DepthMap_1.output}"
Error: "'output'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{FeatureExtraction_1.output}"
Error: "'output'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{CameraInit_1.output}"
Error: "'output'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{FeatureMatching_1.output}"
Error: "'output'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{StructureFromMotion_1.output}"
Error: "'output'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{PrepareDenseScene_1.output}"
Error: "'output'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{Meshing_1.outputMesh}"
Error: "'outputMesh'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{ImageMatching_1.output}"
Error: "'output'".
[2025-12-14 20:51:04,639][WARNING] Connect Attribute from Expression failed.
[2025-12-14 20:51:04,639][WARNING] Expression: "{FeatureExtraction_1.describerTypes}"
Error: "'describerTypes'".
Traceback (most recent call last):
File "/opt/Meshroom/bin/meshroom_batch", line 235, in
raise RuntimeError('meshroom_batch requires a pipeline graph with at least ' +
RuntimeError: meshroom_batch requires a pipeline graph with at least one CopyFiles node, none found.

Please, help

Someone can help me ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions