forked from ILLIXR/Kimera-VIO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_18_04
110 lines (93 loc) · 3.87 KB
/
Dockerfile_18_04
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Use an official Python runtime as a parent image
FROM ubuntu:18.04
MAINTAINER Antoni Rosinol "arosinol@mit.edu"
# To avoid tzdata asking for geographic location...
ENV DEBIAN_FRONTEND noninteractive
# Set the working directory to /root
ENV DIRPATH /root/
WORKDIR $DIRPATH
#Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN apt-get update && apt-get install -y git cmake build-essential pkg-config
# Install xvfb to provide a display to container for GUI realted testing.
RUN apt-get update && apt-get install -y xvfb
# Install OpenCV for Ubuntu 18.04
RUN apt-get update && apt-get install -y \
unzip \
libjpeg-dev libpng-dev libtiff-dev \
libvtk6-dev \
libgtk-3-dev \
libatlas-base-dev gfortran
RUN git clone https://github.com/opencv/opencv.git
RUN cd opencv && \
git checkout tags/3.3.1 && \
mkdir build
RUN git clone https://github.com/opencv/opencv_contrib.git
RUN cd opencv_contrib && \
git checkout tags/3.3.1
RUN cd opencv/build && \
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-D BUILD_opencv_python=OFF \
-D BUILD_opencv_python2=OFF \
-D BUILD_opencv_python3=OFF \
-DOPENCV_EXTRA_MODULES_PATH=$DIRPATH/opencv_contrib/modules .. && \
make -j$(nproc) install
# Install GTSAM
RUN apt-get update && apt-get install -y libboost-all-dev libtbb-dev
ADD https://api.github.com/repos/borglab/gtsam/git/refs/heads/master version.json
RUN git clone https://github.com/borglab/gtsam.git
RUN cd gtsam && \
git fetch && \
git checkout master && \
mkdir build && \
cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DGTSAM_BUILD_TESTS=OFF -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DCMAKE_BUILD_TYPE=Release -DGTSAM_BUILD_UNSTABLE=ON -DGTSAM_POSE3_EXPMAP=ON -DGTSAM_ROT3_EXPMAP=ON .. && \
make -j$(nproc) install
# Install Open_GV
RUN git clone https://github.com/laurentkneip/opengv
RUN cd opengv && \
mkdir build
RUN cd opengv/build && \
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DEIGEN_INCLUDE_DIRS=$DIRPATH/gtsam/gtsam/3rdparty/Eigen \
-DEIGEN_INCLUDE_DIR=$DIRPATH/gtsam/gtsam/3rdparty/Eigen .. && \
make -j$(nproc) install
# Install DBoW2
RUN git clone https://github.com/dorian3d/DBoW2.git
RUN cd DBoW2 && \
mkdir build && \
cd build && \
cmake .. && \
make -j$(nproc) install
# Install RobustPGO
ADD https://api.github.com/repos/MIT-SPARK/Kimera-RPGO/git/refs/heads/master version.json
RUN git clone https://github.com/MIT-SPARK/Kimera-RPGO.git
RUN cd Kimera-RPGO && \
mkdir build && \
cd build && \
cmake .. && \
make -j$(nproc)
RUN apt-get update && \
apt-get install software-properties-common -y
# Get python3
RUN apt-get update && \
add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update && \
apt-get install -y python3.5 python3.5-dev python-pip python3-pip python-tk python3-tk
RUN python3.5 -m pip install PyQt5==5.14
# Install evo-1 for evaluation
# Hack to avoid Docker's cache when evo-1 master branch is updated.
ADD https://api.github.com/repos/ToniRV/evo-1/git/refs/heads/master version.json
RUN git clone https://github.com/ToniRV/evo-1.git
RUN cd evo-1 && python3.5 $(which pip3) install .
# Install spark_vio_evaluation
RUN python3.5 $(which pip3) install ipython prompt_toolkit
# Hack to avoid Docker's cache when spark_vio_evaluation master branch is updated.
ADD https://api.github.com/repos/ToniRV/Kimera-VIO-Evaluation/git/refs/heads/master version.json
RUN git clone https://github.com/ToniRV/Kimera-VIO-Evaluation.git
# We use `pip3 install -e .` so that Jinja2 has access to the webiste template...
RUN cd Kimera-VIO-Evaluation && python3.5 $(which pip3) install -e .
# Install glog, gflags
RUN apt-get update && apt-get install -y libgflags2.2 libgflags-dev libgoogle-glog0v5 libgoogle-glog-dev