-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
173 lines (150 loc) · 4.11 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
FROM osrf/ros:noetic-desktop-full
# avoid config interfaces
ARG DEBIAN_FRONTEND=noninteractive
# initial update and upgrade
RUN apt-get update && apt-get upgrade -y
#--------------------------------------------------
# build tools & base dependencies
#--------------------------------------------------
RUN apt-get update && apt-get install --install-recommends -y \
automake \
bc \
bison \
ccache \
clang \
clang-format \
clang-tidy \
cmake \
cppcheck \
flex \
g++ \
gcc \
gfortran \
git \
libelf-dev \
liblapack-dev \
libqglviewer-dev-qt5 \
libspdlog-dev \
libsuitesparse-dev \
libtool \
libpcap-dev \
libyaml-cpp-dev \
lld \
m4 \
make \
pkg-config \
python-is-python3 \
qt5-qmake \
qtdeclarative5-dev \
sl \
software-properties-common \
texinfo \
vim
# add system76 package archive
RUN apt-add-repository -ys ppa:system76-dev/stable \
&& apt-get update \
&& apt-get -y --fix-broken install
#--------------------------------------------------
# shared dependencies
#--------------------------------------------------
#osqp
COPY dependencies/osqp /tmp/osqp
RUN mkdir /tmp/osqp/build
WORKDIR /tmp/osqp/build
RUN cmake -G "Unix Makefiles" ..
RUN cmake --build . --target install
#fmt
COPY dependencies/fmt /tmp/fmt
RUN mkdir /tmp/fmt/build
WORKDIR /tmp/fmt/build
RUN cmake -DBUILD_SHARED_LIBS=TRUE ..
RUN make install
#qpmad
COPY dependencies/qpmad /tmp/qpmad
RUN mkdir /tmp/qpmad/build
WORKDIR /tmp/qpmad/build
RUN cmake ..
RUN make install
#rosparam_handler
RUN mkdir -p /tmp/rosparam_handler_ws/src
COPY dependencies/rosparam_handler /tmp/rosparam_handler_ws/src
WORKDIR /tmp/rosparam_handler_ws
RUN . /opt/ros/noetic/setup.sh \
&& catkin_make -DCMAKE_INSTALL_PREFIX=/opt/ros/noetic/
WORKDIR /tmp/rosparam_handler_ws/build
RUN make install
#--------------------------------------------------
# control dependencies
#--------------------------------------------------
#swig
COPY dependencies/swig /tmp/swig
WORKDIR /tmp/swig
RUN ./autogen.sh
RUN ./configure
RUN make -j3 && make install
#casadi
COPY dependencies/casadi /tmp/casadi
RUN mkdir /tmp/casadi/build
WORKDIR /tmp/casadi/build
RUN cmake -DWITH_PYTHON=ON -DWITH_OSQP=OFF ..
RUN make -j3 && make install
#gsl
COPY dependencies/GSL /tmp/gsl
WORKDIR /tmp/gsl
RUN ./autogen.sh
RUN ./configure
RUN make -j3 && make install
#blasfeo
COPY dependencies/blasfeo /tmp/blasfeo
WORKDIR /tmp/blasfeo
RUN make -j3 static_library && make install_static
#hpipm
COPY dependencies/hpipm /tmp/hpipm
WORKDIR /tmp/hpipm
RUN make shared_library && make install_shared
#--------------------------------------------------
# slam dependencies
#--------------------------------------------------
# g2o
COPY dependencies/g2o /tmp/g2o
RUN mkdir /tmp/g2o/build
WORKDIR /tmp/g2o/build
RUN cmake .. && make -j3 && make install
# mrpt
RUN add-apt-repository -y ppa:joseluisblancoc/mrpt-stable
RUN apt-get update && apt-get install -y \
libmrpt-dev \
mrpt-apps
# rviz plugin
RUN apt-get update && apt-get install -y \
ros-noetic-jsk-rviz-plugins
#--------------------------------------------------
# trajectory dependencies
#--------------------------------------------------
RUN apt-get update && apt-get install -y \
pip \
python3-tk
RUN pip install scikit-learn
#--------------------------------------------------
# monitoring tools
#--------------------------------------------------
RUN apt-get update && apt-get install --install-recommends -y \
htop \
ros-noetic-rqt-multiplot \
ros-noetic-plotjuggler-ros \
ros-noetic-rosmon
#--------------------------------------------------
# debugging tools
#--------------------------------------------------
RUN apt-get update && apt-get install --install-recommends -y \
gdb
#--------------------------------------------------
# post installation steps
#--------------------------------------------------
# source setup.bash via bashrc
RUN echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc
#remove /opt/ros/noetic/include/fmt
RUN rm -rf /opt/ros/noetic/include/fmt
# set working directory and shell
WORKDIR /
CMD ["bash"]