From 62ab373f7ec0fd16bbc61e699edba25de72d4f08 Mon Sep 17 00:00:00 2001 From: Brian Xu Date: Fri, 17 Jan 2025 13:42:33 -0500 Subject: [PATCH] Add GLOMAP to Dockerfile (#3565) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add GLOMAP to dockerfile Co-authored-by: Jonáš Kulhánek --- Dockerfile | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4255755fa1..6cd4e058f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ ENV QT_XCB_GL_INTEGRATION=xcb_egl RUN apt-get update && \ apt-get install -y --no-install-recommends --no-install-suggests \ git \ - cmake \ + wget \ ninja-build \ build-essential \ libboost-program-options-dev \ @@ -46,6 +46,27 @@ RUN apt-get update && \ python3.10-dev \ python3-pip +# Build and install CMake +RUN wget https://github.com/Kitware/CMake/releases/download/v3.31.3/cmake-3.31.3-linux-x86_64.sh \ + -q -O /tmp/cmake-install.sh \ + && chmod u+x /tmp/cmake-install.sh \ + && mkdir /opt/cmake-3.31.3 \ + && /tmp/cmake-install.sh --skip-license --prefix=/opt/cmake-3.31.3 \ + && rm /tmp/cmake-install.sh \ + && ln -s /opt/cmake-3.31.3/bin/* /usr/local/bin + +# Build and install GLOMAP. +RUN git clone https://github.com/colmap/glomap.git && \ + cd glomap && \ + git checkout "1.0.0" && \ + mkdir build && \ + cd build && \ + mkdir -p /build && \ + cmake .. -GNinja "-DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES}" \ + -DCMAKE_INSTALL_PREFIX=/build/glomap && \ + ninja install -j1 && \ + cd ~ + # Build and install COLMAP. RUN git clone https://github.com/colmap/colmap.git && \ cd colmap && \ @@ -123,6 +144,7 @@ RUN apt-get update && \ # Copy packages from builder stage. COPY --from=builder /build/colmap/ /usr/local/ +COPY --from=builder /build/glomap/ /usr/local/ COPY --from=builder /usr/local/lib/python3.10/dist-packages/ /usr/local/lib/python3.10/dist-packages/ COPY --from=builder /usr/local/bin/ns* /usr/local/bin/