forked from aivijay/lsd_slam_noros
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
81 lines (57 loc) · 1.7 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
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
FROM ubuntu:18.04
ARG OPENCV_VERSION=2.4.13.6
ARG WORKSPACE=/root/workspace
ARG NTHREADS=4
RUN mkdir -p $WORKSPACE
RUN apt-get update
RUN apt-get -y install wget cmake
# install OpenCV
WORKDIR $WORKSPACE
RUN apt-get -y install clang libgtk2.0-dev pkg-config
RUN wget https://github.com/opencv/opencv/archive/$OPENCV_VERSION.tar.gz \
&& tar xvf $OPENCV_VERSION.tar.gz \
&& cd opencv-$OPENCV_VERSION/ \
&& mkdir -p release \
&& cd release \
&& cmake .. \
&& make -j$NTHREADS \
&& make install \
&& cd ../../ \
&& rm $OPENCV_VERSION.tar.gz \
&& rm -r opencv-$OPENCV_VERSION
# install Eigen
WORKDIR $WORKSPACE
RUN wget -c https://gitlab.com/libeigen/eigen/-/archive/3.2.1/eigen-3.2.1.tar.gz \
&& tar xvf eigen-3.2.1.tar.gz \
&& cd eigen-3.2.1 \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make install \
&& cd ../../ \
&& rm eigen-3.2.1.tar.gz \
&& rm -r eigen-3.2.1
# install g2o
WORKDIR $WORKSPACE
RUN apt-get update
RUN apt-get -y install git libsuitesparse-dev
RUN git clone https://github.com/RainerKuemmerle/g2o.git \
&& cd g2o \
&& git checkout 67d5fa7 \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
&& make -j$NTHREADS \
&& make install
# install LSD-SLAM
WORKDIR $WORKSPACE
RUN apt-get update
RUN apt-get -y install libboost-all-dev freeglut3-dev libglew-dev libcanberra-gtk-module
# build in a single process since it seems parallel build doesn't contribute to the speed
RUN git clone https://github.com/IshitaTakeshi/lsd_slam_noros.git \
&& cd lsd_slam_noros/ \
&& mkdir build \
&& cd build/ \
&& cmake .. \
&& make
WORKDIR $WORKSPACE/lsd_slam_noros