forked from cdcseacave/openMVS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add docker functionality (cdcseacave#504)
- Loading branch information
1 parent
494e006
commit c0b7a6f
Showing
4 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM ubuntu:18.04 | ||
|
||
# Initialize the environment | ||
RUN apt update | ||
RUN apt install -y cmake git vim | ||
|
||
# Prepare and empty machine for building: | ||
RUN apt-get update -yq | ||
RUN apt-get install -yq | ||
RUN apt-get -y install git mercurial cmake libpng-dev libjpeg-dev libtiff-dev libglu1-mesa-dev | ||
|
||
# Eigen (Known issues with eigen 3.3.7 as of 12/10/2019, so using this tested branch/commit instead) | ||
RUN git clone https://gitlab.com/libeigen/eigen --branch 3.2 ed5cd0a4d16e12daa1bef608628c103e67969d63 | ||
RUN mkdir eigen_build | ||
RUN cd eigen_build &&\ | ||
cmake . ../eigen &&\ | ||
make && make install &&\ | ||
cd .. | ||
|
||
# Boost | ||
RUN apt-get -y install libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-serialization-dev | ||
|
||
# OpenCV | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq libopencv-dev | ||
|
||
# CGAL | ||
RUN apt-get -y install libcgal-dev libcgal-qt5-dev | ||
|
||
# VCGLib | ||
RUN git clone https://github.com/cdcseacave/VCG.git vcglib | ||
|
||
# Build from stable release openMVS1.0 | ||
RUN git clone https://github.com/cdcseacave/openMVS.git --branch v1.0 | ||
|
||
# Uncomment below (and comment above) to use the latest commit from the master branch | ||
# RUN git clone https://github.com/cdcseacave/openMVS.git openMVS | ||
|
||
RUN mkdir openMVS_build | ||
RUN cd openMVS_build &&\ | ||
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT=/vcglib | ||
|
||
# Install OpenMVS library | ||
RUN cd openMVS_build &&\ | ||
make -j4 &&\ | ||
make install | ||
ENV PATH /usr/local/bin/OpenMVS:$PATH |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
docker pull openmvs/openmvs-ubuntu:latest | ||
docker run -w /working -v $1:/working -it openmvs/openmvs-ubuntu:latest |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
# Building & running openMVS using Docker | ||
|
||
## Quick start: | ||
|
||
1. Make sure docker is installed on your local machine. | ||
2. Run the 'easy start' script, using the *full local path* to the folder with your SFM input files (perhaps output from openMVG or COLMAP): | ||
|
||
./QUICK_START.sh /path/where/your/SFM/results/are | ||
|
||
3. This will put you in a directory (inside the Docker container) mounted to the local path you specified so that you can run openMVS binaries on your own SFM inputs. Enjoy! | ||
|
||
## Build from scratch: | ||
|
||
You can also build the docker image from scratch based on the **Dockerfile** (perhaps with your own changes / modifications) using: | ||
|
||
./buildFromScratch.sh /path/where/your/SFM/results/are | ||
|
||
## NOTES | ||
|
||
+ This workflow is pinned to build from [openMVS 1.0](https://github.com/cdcseacave/openMVS/releases/tag/v1.0). To build from a different release, or build from the latest commit on master, open up the Dockerfile and comment/uncomment as directed. | ||
|
||
+ Running openMVS binaries can use a lot of memory (depending on the size of your data set/ imagery). Docker has a relatively small default memory setting (2Gb on Mac). You will probably want to increase this before you run any larger workflows. From Docker desktop on Mac for example, just open the Docker GUI, go to the *Advanced* tab and increase via the slider: | ||
|
||
![alt text][dockerParam] | ||
|
||
[dockerParam]: https://i.stack.imgur.com/6iWiW.png "Recommend increasing memory to >4Gb" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
docker build -t="openmvs-ubuntu" .; | ||
docker run -w /working -v $1:/working -it openmvs-ubuntu; |