forked from mapillary/OpenSfM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (44 loc) · 1.5 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:14.04
# Install apt-getable dependencies
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git wget \
python-dev python-pip libboost-python-dev \
python-numpy python-scipy python-yaml python-pyexiv2 \
libopencv-dev python-opencv \
libgoogle-glog-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install Ceres from source
RUN \
mkdir -p /source && cd /source && \
wget http://ceres-solver.org/ceres-solver-1.10.0.tar.gz && \
tar xvzf ceres-solver-1.10.0.tar.gz && \
cd /source/ceres-solver-1.10.0 && \
mkdir -p build && cd build && \
cmake .. -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DOPENMP=OFF && \
make install && \
cd / && \
rm -rf /source/ceres-solver-1.10.0 && \
rm -f /source/ceres-solver-1.10.0.tar.gz
# Install opengv from source
RUN \
mkdir -p /source && cd /source && \
git clone https://github.com/paulinus/opengv.git && \
cd /source/opengv && \
git checkout python-wrapper && \
mkdir -p build && cd build && \
cmake .. -DBUILD_TESTS=OFF -DBUILD_PYTHON=ON && \
make install && \
cd / && \
rm -rf /source/opengv
# OpenSfM
RUN \
mkdir -p /source && cd /source && \
git clone https://github.com/mapillary/OpenSfM.git && \
cd /source/OpenSfM && \
pip install -r requirements.txt && \
python setup.py build
# GENERIC
WORKDIR /