-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
142 lines (118 loc) · 4.12 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
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
132
133
134
135
136
137
138
139
140
141
142
# Reference : https://github.com/changh95/fastcampus_slam_codes/blob/main/Dockerfile
FROM ubuntu:jammy
ENV ROS_DISTRO=humble
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install build-essential -y && \
apt-get install cmake -y && \
apt-get install git -y && \
apt-get install sudo -y && \
apt-get install wget -y && \
apt-get install curl -y && \
apt-get install ninja-build -y && \
apt-get install software-properties-common -y && \
apt-get install python3 -y && \
apt-get install python3-pip -y && \
apt-get install -y ssh && \
apt-get install -y gcc && \
apt-get install -y g++ && \
apt-get install -y gdb && \
apt-get install -y cmake && \
apt-get install -y rsync && \
apt-get install -y tar && \
apt-get install -y x11-utils && \
apt-get install -y x11-apps && \
apt-get install -y zip && \
apt-get install -y tzdata && \
apt-get install -y gnupg2 && \
apt-get install -y lsb-release && \
apt-get clean
# ROS2 humble
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - && \
sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2.list'
RUN apt-get update && apt-get install -y ros-${ROS_DISTRO}-desktop && \
rm -rf /var/lib/apt/lists/*
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /root/.bashrc
# Clang
RUN wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 14 && rm llvm.sh
RUN apt-get install clang clangd
# OpenCV
RUN apt-get install -y cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
RUN wget https://github.com/opencv/opencv/archive/refs/tags/4.8.1.zip &&\
unzip 4.8.1.zip &&\
cd opencv-4.8.1 &&\
mkdir build && cd build &&\
cmake .. &&\
make -j4 &&\
make install &&\
cd ../../
# Eigen
RUN wget https://gitlab.com/libeigen/eigen/-/archive/3.3.8/eigen-3.3.8.zip &&\
unzip eigen-3.3.8.zip &&\
cd eigen-3.3.8 &&\
mkdir build && cd build &&\
cmake .. &&\
make -j4 &&\
make install &&\
cd ../../
# Sophus
RUN wget https://github.com/strasdat/Sophus/archive/refs/tags/1.22.10.zip &&\
unzip 1.22.10.zip &&\
cd Sophus-1.22.10 &&\
mkdir build && cd build &&\
cmake .. &&\
make -j4 &&\
make install && \
cd ../../
# Pangolin
RUN apt-get install -y mesa-utils && \
apt-get install -y libgl1-mesa-glx && \
apt-get install -y libglu1-mesa-dev && \
apt-get install -y libglew-dev &&\
apt-get install -y libglvnd-dev &&\
apt-get install -y libgl1-mesa-dev &&\
apt-get install -y libegl1-mesa-dev &&\
apt-get install -y mesa-common-dev
RUN wget https://github.com/stevenlovegrove/Pangolin/archive/refs/tags/v0.6.zip &&\
unzip v0.6.zip &&\
cd Pangolin-0.6 &&\
sed -i '1i#include <stdexcept>\n#include <limits>' /Pangolin-0.6/include/pangolin/gl/colour.h &&\
mkdir build && cd build &&\
cmake .. &&\
make -j4 &&\
make install &&\
cd ../../
# Ceres-solver
RUN apt-get install -y libgoogle-glog-dev libgflags-dev libatlas-base-dev libsuitesparse-dev &&\
wget https://github.com/ceres-solver/ceres-solver/archive/refs/tags/2.1.0.zip &&\
unzip 2.1.0.zip &&\
cd ceres-solver-2.1.0 && \
mkdir build && cd build &&\
cmake .. &&\
make -j4 &&\
make install &&\
cd ../../
# glew 2.1
RUN wget https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz && \
tar -xvf glew-2.1.0.tgz && \
cd glew-2.1.0 && \
make && \
make install
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# G2O
RUN git clone https://github.com/RainerKuemmerle/g2o.git && \
cd g2o && \
mkdir build && cd build && \
cmake .. && \
make -j$(nproc) && \
make install
# GLUT
RUN apt-get update && apt-get install -y freeglut3-dev
# visual odometry
RUN git clone https://github.com/ai-robotics-kr/2024-visual-slam.git && \
cd 2024-visual-slam && \
mkdir build && cd build && \
cmake .. && \
make -j4
RUN apt-get clean && rm -rf /var/lib/apt/lists/* && ldconfig
WORKDIR /2024-visual-slam/