forked from MIT-SPARK/Kimera-VIO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_16_04
91 lines (76 loc) · 3.09 KB
/
Dockerfile_16_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
# Use an official Python runtime as a parent image
FROM ubuntu:16.04
MAINTAINER Antoni Rosinol "[email protected]"
# 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 \
libvtk5-dev \
libgtk2.0-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 (in 16_04 it needs an updated cmake...)
ADD https://cmake.org/files/v3.15/cmake-3.15.7-Linux-x86_64.sh /cmake-3.15.7-Linux-x86_64.sh
RUN mkdir /opt/cmake
RUN sh /cmake-3.15.7-Linux-x86_64.sh --prefix=/opt/cmake --skip-license
RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
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 && \
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 -DGTSAM_TANGENT_PREINTEGRATION=OFF .. && \
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)
# Install glog, gflags
RUN apt-get update && apt-get install -y libgflags2v5 libgflags-dev libgoogle-glog0v5 libgoogle-glog-dev