-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
Dockerfile
46 lines (42 loc) · 1.44 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
FROM ros:kinetic-perception
ENV CERES_VERSION="1.12.0"
ENV CATKIN_WS=/root/catkin_ws
# set up thread number for building
RUN if [ "x$(nproc)" = "x1" ] ; then export USE_PROC=1 ; \
else export USE_PROC=$(($(nproc)/2)) ; fi && \
apt-get update && apt-get install -y \
cmake \
libatlas-base-dev \
libeigen3-dev \
libgoogle-glog-dev \
libsuitesparse-dev \
python-catkin-tools \
ros-${ROS_DISTRO}-cv-bridge \
ros-${ROS_DISTRO}-image-transport \
ros-${ROS_DISTRO}-message-filters \
ros-${ROS_DISTRO}-tf && \
rm -rf /var/lib/apt/lists/* && \
# Build and install Ceres
git clone https://ceres-solver.googlesource.com/ceres-solver && \
cd ceres-solver && \
git checkout tags/${CERES_VERSION} && \
mkdir build && cd build && \
cmake .. && \
make -j$(USE_PROC) install && \
rm -rf ../../ceres-solver && \
mkdir -p $CATKIN_WS/src/VINS-Mono/
# Copy VINS-Mono
COPY ./ $CATKIN_WS/src/VINS-Mono/
# use the following line if you only have this dockerfile
# RUN git clone https://github.com/HKUST-Aerial-Robotics/VINS-Mono.git
# Build VINS-Mono
WORKDIR $CATKIN_WS
ENV TERM xterm
ENV PYTHONIOENCODING UTF-8
RUN catkin config \
--extend /opt/ros/$ROS_DISTRO \
--cmake-args \
-DCMAKE_BUILD_TYPE=Release && \
catkin build && \
sed -i '/exec "$@"/i \
source "/root/catkin_ws/devel/setup.bash"' /ros_entrypoint.sh