-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
106 lines (91 loc) · 2.85 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
FROM ros:melodic-ros-base
LABEL Description="kalibr"
LABEL AUTHORS="Christian Brommer <[email protected]>,Martin Scheiber <[email protected]>"
# setup environment
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV TERM xterm
ENV container docker
RUN export DEBIAN_FRONTEND=noninteractive; \
apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y \
-o "Dpkg::Options::=--force-confdef" \
-o "Dpkg::Options::=--force-confold" \
build-essential \
git \
gnupg \
htop \
locales \
lsb-release \
nano \
net-tools \
openssh-client \
sudo \
vim \
wget && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
# For ubuntu < 20.04 udev is a separate package
RUN apt-get update && apt-get install -y \
udev \
&& rm -rf /var/lib/apt/lists/*
# Setup locales
RUN locale-gen en_US.UTF-8
ENV LANG='en_US.UTF-8' \
LANGUAGE='en_US:en' \
LC_ALL='en_US.UTF-8'
# Update python for ros
RUN apt-get update && apt-get install -y \
python-catkin-pkg \
python-osrf-pycommon \
python-catkin-tools \
python-rosdep \
python-rosinstall \
python-rosinstall-generator \
python-wstool && \
rm -rf /var/lib/apt/lists/*
## Install kalibr dependencies
RUN apt-get update && apt-get install -y \
doxygen \
ipython \
libeigen3-dev \
libv4l-dev \
libboost-all-dev \
libpoco-dev \
libtbb-dev \
libblas-dev \
liblapack-dev \
libopencv-dev \
python-git \
python-matplotlib \
python-pip \
python-pyx \
python-scipy \
python-setuptools \
ros-melodic-vision-opencv \
ros-melodic-image-transport-plugins \
ros-melodic-cmake-modules \
software-properties-common && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y \
python-igraph && \
rm -rf /var/lib/apt/lists/*
## Setup catkin workspace
RUN mkdir -p /kalibr/catkin_ws/src
WORKDIR /kalibr/catkin_ws
RUN bash -c 'source /opt/ros/melodic/setup.bash && catkin init && catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release'
## Get and build kalibr at certain commit
WORKDIR /kalibr/catkin_ws/src
RUN git clone https://github.com/ethz-asl/Kalibr.git && cd Kalibr/ && git checkout 60f0f1e7
WORKDIR /kalibr/catkin_ws
# Add --no-check-certificate for wget on SuiteSparse until its fixed upstream
RUN sed -i 's|wget http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-${VERSION}.tar.gz|wget http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-${VERSION}.tar.gz --no-check-certificate|g' src/Kalibr/suitesparse/CMakeLists.txt
RUN bash -c 'source /opt/ros/melodic/setup.bash && catkin build -j4'
#RUN ln /dev/null /dev/raw1394
RUN mkdir /kalibr/data
WORKDIR /kalibr/data
#RUN useradd -md /kalibr kalibr
#USER kalibr
RUN echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
RUN echo "source /kalibr/catkin_ws/devel/setup.bash" >> ~/.bashrc