• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

DockerfileH A D24-Jul-20201.4 KiB5448

README.mdH A D24-Jul-20202.5 KiB5733

build.shH A D24-Jul-2020103 32

quick-start.shH A D24-Jul-2020108 32

setup-centos.shH A D24-Jul-2020406 115

setup-ubuntu.shH A D24-Jul-2020518 126

README.md

1# How to build COLMAP using Docker
2
3## Requirements
4- A linux based host machine with at least one NVIDIA GPU<sup>[1](#f1)</sup>.
5
6## Quick Start:
7
81. Check that Docker >=19.03<sup>[2](#f2)</sup> installed on your host machine:
9
10`docker --version`
11
122. Check that you have an NVIDIA driver installed on your host machine:
13
14`nvidia-smi`
15
163. Setup the nvidia-toolkit on your host machine<sup>[3](#f3)</sup>:
17
18For Ubuntu host machines: `./setup-ubuntu.sh`
19
20For CentOS host machines: `./setup-centos.sh`
21
224. Run the *quick-start* script, using the *full local path* to your prefered
23local working directory (a folder with your input files/images, etc.):
24
25`./quick-start.sh /path/where/your/working/folder/is`
26
27This will put you in a directory (inside the Docker container) mounted to the
28local path you specified. Now you can run COLMAP binaries<sup>[4](#f4)</sup>
29on your own inputs like this:
30
31`colmap automatic_reconstructor --image_path ./images --workspace_path .`
32
33## Build from Scratch
34
35After completing steps 1-3, you can alternatively build the docker image from
36scratch based on the **Dockerfile** (e.g., with your own modifications) using:
37
38`./build.sh /path/where/your/working/folder/is`
39
40## Notes
41
42Running COLMAP binaries can use a lot of memory (depending on the size of your
43data set / imagery). Docker has a relatively small default memory setting
44(2Gb on Mac). You will probably want to increase this before you run any larger
45workflows. From Docker desktop on Mac for example, just open the Docker GUI, go
46to the *Advanced* tab and increase via the slider:
47
48![](docker-memory-settings.png?raw=true)
49
50<a name="f1">1</a>: COLMAP needs NVIDA GPU compute hardware for dense reconstruction (as of 12/10/2019), and is optional for feature extraction and matching.
51
52<a name="f2">2</a>: This is because Docker 19.03+ natively supports NVIDIA GPUs.
53
54<a name="f3">3</a>: You should get a similar output to what you get when you ran step 2 on your host, since the docker container is detecting the same GPU(s). If you have trouble, you may want to read the [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) webpage, as the scripts `./setup-ubuntu.sh` and `./setup-centos.sh` are based on instructions posted there and may change over time.
55
56<a name="f4">4</a>: Right now this workflow is designed to build the latest release of COLMAP. To build a specific release, open up the Dockerfile and append '--branch *RELEASE_TAG*' as indicated in the Dockerfile, with *RELEASE_TAG* being the specific release you want to build.
57