Last active
June 4, 2025 05:36
-
-
Save jimlinntu/d685de7352a878989125f04fe1289be1 to your computer and use it in GitHub Desktop.
Dockerfile for colmap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM nvidia/cuda:11.7.1-devel-ubuntu22.04 | |
| ARG COLMAP_VERSION=3.8 | |
| ARG CUDA_ARCHITECTURES=75 | |
| # Prevent stop building ubuntu at time zone selection. | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Prepare and empty machine for building. | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| cmake \ | |
| ninja-build \ | |
| build-essential \ | |
| libboost-program-options-dev \ | |
| libboost-filesystem-dev \ | |
| libboost-graph-dev \ | |
| libboost-system-dev \ | |
| libboost-test-dev \ | |
| libeigen3-dev \ | |
| libflann-dev \ | |
| libfreeimage-dev \ | |
| libmetis-dev \ | |
| libgoogle-glog-dev \ | |
| libgflags-dev \ | |
| libsqlite3-dev \ | |
| libglew-dev \ | |
| qtbase5-dev \ | |
| libqt5opengl5-dev \ | |
| libcgal-dev \ | |
| libceres-dev | |
| # Build and install COLMAP. | |
| RUN git clone https://github.com/colmap/colmap.git | |
| RUN cd colmap && \ | |
| git reset --hard ${COLMAP_VERSION} && \ | |
| mkdir build && \ | |
| cd build && \ | |
| cmake .. -GNinja -DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES} && \ | |
| ninja && \ | |
| ninja install && \ | |
| cd .. && rm -rf colmap |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Encounter this during:
Downloading vocab tree... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ 100% 0:00:01 ────────────────────────────────────────────── 💀 💀 💀 ERROR 💀 💀 💀 ─────────────────────────────────────────────── Error running command: /mnt/jim/colmap_dir/docker_colmap vocab_tree_matcher --database_path .../preprocess_dataset2/colmap/database.db --SiftMatching.use_gpu 1 --VocabTreeMatching.vocab_tree_path "/home/jimlin7777/.local/share/nerfstudio/vocab_tree.fbow" ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────`I think this is due to NerfStudio's fixed vocab
https://github.com/nerfstudio-project/nerfstudio/blob/2adcc380c6c846fe032b1fe55ad2c960e170a215/nerfstudio/process_data/colmap_utils.py#L76
Trying to downgrade to colmap 3.8 from colmap/colmap@43de802
Might need to refer to older Dockerfile: https://github.com/colmap/colmap/blob/43de802cfb3ed2bd155150e7e5e3e8c8dd5aaa3e/docker/Dockerfile