forked from luxonis/Kimera-VIO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_22_04
131 lines (108 loc) · 4.62 KB
/
Dockerfile_22_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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Use an official Python runtime as a parent image
FROM ubuntu:22.04
# Author 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 \
libvtk7-dev \
libgtk-3-dev \
libatlas-base-dev gfortran
# Install GTSAM
RUN apt-get update && apt-get install -y libboost-all-dev libtbb-dev libopencv-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 af6a4f2417af4f537fe8ce43c471781267776b6c && \
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)
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.10-dev python3-pip python3-tk python3-pyqt5
# python3.10
# RUN pip install --upgrade pip
# 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.10 $(which pip3) install .
# Install Kimera VIO Evaluation
RUN python3.10 $(which pip3) install ipython prompt_toolkit
# Hack to avoid Docker's cache when Kimera VIO Evaluation master branch is updated.
# ADD https://api.github.com/repos/MIT-SPARK/Kimera-VIO-Evaluation/git/refs/heads/master version.json
RUN git clone https://github.com/MIT-SPARK/Kimera-VIO-Evaluation.git
# We use `pip3 install -e .` so that Jinja2 has access to the webiste template...
RUN cd Kimera-VIO-Evaluation && git fetch && git checkout master && python3.10 $(which pip3) install -e .
# Install glog, gflags
RUN apt-get update && apt-get install -y libgflags2.2 libgflags-dev libgoogle-glog0v5 libgoogle-glog-dev
# Install Pangolin
RUN apt-get update && apt-get install -y libgl1-mesa-dev libglew-dev wget
RUN git clone https://github.com/stevenlovegrove/Pangolin.git
RUN cd Pangolin && \
mkdir build && \
cd build && \
cmake .. && \
make -j$(nproc)
# Add credentials on build
ARG SSH_PRIVATE_KEY
RUN mkdir /root/.ssh/
RUN echo "${SSH_PRIVATE_KEY}" > /root/.ssh/id_rsa
RUN chmod 600 ~/.ssh/id_rsa
# Make sure your domain is accepted
RUN touch /root/.ssh/known_hosts
RUN ssh-keyscan -t rsa github.com >> /root/.ssh/known_hosts
# install depthai
RUN git clone --recursive https://github.com/luxonis/depthai-core.git --branch main
RUN cmake -Hdepthai-core -Bdepthai-core/build -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/local
RUN cmake --build depthai-core/build --target install --parallel 4
# Install Kimera-VIO
# RUN git clone https://github.com/sacing13/Kimera-VIO.git --branch std-oak-vio
# RUN cd Kimera-VIO && mkdir build && cd build && cmake .. && make -j1
# RUN apt-get update && apt-get install -y wget
RUN mkdir Kimera-VIO
COPY ./ $DIRPATH/Kimera-VIO
RUN cd Kimera-VIO && mkdir build && cd build && cmake .. && make -j1
CMD cd /