Skip to content

Commit 62ab373

Browse files
brian-xujkulhanek
andauthored
Add GLOMAP to Dockerfile (#3565)
add GLOMAP to dockerfile Co-authored-by: Jonáš Kulhánek <[email protected]>
1 parent 66cd681 commit 62ab373

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

Dockerfile

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ENV QT_XCB_GL_INTEGRATION=xcb_egl
2424
RUN apt-get update && \
2525
apt-get install -y --no-install-recommends --no-install-suggests \
2626
git \
27-
cmake \
27+
wget \
2828
ninja-build \
2929
build-essential \
3030
libboost-program-options-dev \
@@ -46,6 +46,27 @@ RUN apt-get update && \
4646
python3.10-dev \
4747
python3-pip
4848

49+
# Build and install CMake
50+
RUN wget https://github.com/Kitware/CMake/releases/download/v3.31.3/cmake-3.31.3-linux-x86_64.sh \
51+
-q -O /tmp/cmake-install.sh \
52+
&& chmod u+x /tmp/cmake-install.sh \
53+
&& mkdir /opt/cmake-3.31.3 \
54+
&& /tmp/cmake-install.sh --skip-license --prefix=/opt/cmake-3.31.3 \
55+
&& rm /tmp/cmake-install.sh \
56+
&& ln -s /opt/cmake-3.31.3/bin/* /usr/local/bin
57+
58+
# Build and install GLOMAP.
59+
RUN git clone https://github.com/colmap/glomap.git && \
60+
cd glomap && \
61+
git checkout "1.0.0" && \
62+
mkdir build && \
63+
cd build && \
64+
mkdir -p /build && \
65+
cmake .. -GNinja "-DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES}" \
66+
-DCMAKE_INSTALL_PREFIX=/build/glomap && \
67+
ninja install -j1 && \
68+
cd ~
69+
4970
# Build and install COLMAP.
5071
RUN git clone https://github.com/colmap/colmap.git && \
5172
cd colmap && \
@@ -123,6 +144,7 @@ RUN apt-get update && \
123144

124145
# Copy packages from builder stage.
125146
COPY --from=builder /build/colmap/ /usr/local/
147+
COPY --from=builder /build/glomap/ /usr/local/
126148
COPY --from=builder /usr/local/lib/python3.10/dist-packages/ /usr/local/lib/python3.10/dist-packages/
127149
COPY --from=builder /usr/local/bin/ns* /usr/local/bin/
128150

0 commit comments

Comments
 (0)