Compare commits

...

2 Commits

Author SHA1 Message Date
rsformoso c8bb32773e Compile Ceres to support cuDSS 2026-01-15 23:58:06 +08:00
rsformoso 6917780253 Add COLMAP cache folder bindmount 2026-01-15 23:57:25 +08:00
2 changed files with 40 additions and 7 deletions
+36 -7
View File
@@ -36,10 +36,29 @@ RUN apt-get update && \
libqt6opengl6-dev \
libqt6openglwidgets6 \
libcgal-dev \
libceres-dev \
libcurl4-openssl-dev \
libssl-dev \
libmkl-full-dev
libmkl-full-dev \
libsuitesparse-dev \
libcudss0-dev-cuda-12 \
libcudss0-static-cuda-12
# Install Ceres Solver with CUDA support. Disable testing and examples since
# the GPU isn't available to us at build time
RUN git clone --recursive https://github.com/ceres-solver/ceres-solver
RUN mkdir ceres-bin && \
cd ceres-bin && \
cmake ../ceres-solver \
-DUSE_CUDA=ON \
-DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES} \
-DBUILD_TESTING=OFF \
-DBUILD_EXAMPLES=OFF \
-DCMAKE_BUILD_TYPE=Release \
-Dcudss_DIR=/usr/lib/x86_64-linux-gnu/libcudss/12/cmake/cudss \
-Dcudss_INCLUDE_DIR=/usr/include/libcudss/12 && \
make -j8 && \
make test && \
make install
# Fix issue in Ubuntu's openimageio CMake config.
# We don't depend on any of openimageio's OpenCV functionality,
@@ -47,7 +66,7 @@ RUN apt-get update && \
RUN mkdir -p /usr/include/opencv4
# Build and install COLMAP.
RUN git clone https://github.com/colmap/colmap.git
RUN git clone --recursive https://github.com/colmap/colmap.git
RUN cd colmap && \
git fetch https://github.com/colmap/colmap.git ${COLMAP_GIT_COMMIT} && \
git checkout FETCH_HEAD && \
@@ -57,7 +76,9 @@ RUN cd colmap && \
-GNinja \
-DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES} \
-DCMAKE_INSTALL_PREFIX=/colmap-install \
-DBLA_VENDOR=Intel10_64lp && \
-DBLA_VENDOR=Intel10_64lp \
-Dcudss_DIR=/usr/lib/x86_64-linux-gnu/libcudss/12/cmake/cudss \
-Dcudss_INCLUDE_DIR=/usr/include/libcudss/12 && \
ninja install
#
@@ -71,11 +92,12 @@ FROM nvidia/cuda:${NVIDIA_CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION} AS runti
RUN apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests \
libboost-program-options1.83.0 \
libspqr4 \
libcholmod5 \
libc6 \
libomp5 \
libopengl0 \
libmetis5 \
libceres4t64 \
libopenimageio2.4t64 \
libgcc-s1 \
libgl1 \
@@ -90,7 +112,8 @@ RUN apt-get update && \
libmkl-locale \
libmkl-intel-lp64 \
libmkl-intel-thread \
libmkl-core && \
libmkl-core \
libcudss0-cuda-12 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
@@ -100,4 +123,10 @@ RUN apt-get update && \
# of this Docker image to use it as a base image for compiling against COLMAP as
# a library. For instance, CMake will be able to find COLMAP easily with the
# command: find_package(COLMAP REQUIRED).
COPY --from=builder /colmap-install/ /usr/local/
COPY --from=builder /colmap-install/ /usr/local/
COPY --from=builder /usr/local/include/ /usr/local/include/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/x86_64-linux-gnu/libcudss /usr/lib/x86_64-linux-gnu/libcudss
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/libcudss/12:$LD_LIBRARY_PATH
WORKDIR /workspace
+4
View File
@@ -7,3 +7,7 @@ services:
extends:
file: ../config.yml
service: win-gui-app
volumes:
- type: bind
source: ./.cache/colmap
target: /root/.cache