forked from sjtuyinjie/Ultra-Fusion
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.ros2
More file actions
130 lines (120 loc) · 3.8 KB
/
Copy pathDockerfile.ros2
File metadata and controls
130 lines (120 loc) · 3.8 KB
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
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG NO_PROXY
ARG http_proxy
ARG https_proxy
ARG no_proxy
RUN apt-get update && apt-get install -y --no-install-recommends \
bash-completion \
ca-certificates \
curl \
gnupg2 \
lsb-release \
&& curl -fsSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \
| gpg --dearmor -o /usr/share/keyrings/ros-archive-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu jammy main" \
>/etc/apt/sources.list.d/ros2.list \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends \
bash-completion \
build-essential \
cmake \
coreutils \
dbus-x11 \
git \
iputils-ping \
less \
libatlas-base-dev \
libboost-thread-dev \
libeigen3-dev \
libfmt-dev \
libgflags-dev \
libgl1-mesa-dri \
libgl1-mesa-glx \
libglu1-mesa \
libgoogle-glog-dev \
libgoogle-glog0v5 \
libopencv-dev \
libpcl-dev \
libsuitesparse-dev \
libtbb-dev \
libx11-6 \
libx11-dev \
libxau6 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-render-util0 \
libxcb-xinerama0 \
libxcb-xinput0 \
libxext-dev \
libxkbcommon-x11-0 \
libxt-dev \
mesa-utils \
nano \
ncurses-bin \
net-tools \
patchelf \
procps \
python3-pip \
python3-lz4 \
ros-humble-cv-bridge \
ros-humble-geometry-msgs \
ros-humble-nav-msgs \
ros-humble-pcl-conversions \
ros-humble-rclcpp \
ros-humble-rosbag2 \
ros-humble-rosbag2-storage-default-plugins \
ros-humble-rviz2 \
ros-humble-sensor-msgs \
ros-humble-std-msgs \
ros-humble-tf2 \
ros-humble-tf2-ros \
ros-humble-visualization-msgs \
vim-tiny \
wget \
xauth \
&& python3 -m pip install --no-cache-dir rosbags \
&& rm -rf /var/lib/apt/lists/*
ARG CERES_VERSION=2.1.0
ARG YAML_CPP_VERSION=0.8.0
ARG BUILD_JOBS=4
RUN git clone --branch "${CERES_VERSION}" --depth 1 https://github.com/ceres-solver/ceres-solver.git /tmp/ceres \
&& cmake -S /tmp/ceres -B /tmp/ceres/build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE="-O3 -DNDEBUG" \
-DBUILD_EXAMPLES=OFF \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DMINIGLOG=OFF \
&& cmake --build /tmp/ceres/build --target install -- -j"${BUILD_JOBS}" \
&& git clone --branch "${YAML_CPP_VERSION}" --depth 1 https://github.com/jbeder/yaml-cpp.git /tmp/yaml-cpp \
&& cmake -S /tmp/yaml-cpp -B /tmp/yaml-cpp/build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE="-O3 -DNDEBUG" \
-DBUILD_SHARED_LIBS=ON \
-DYAML_CPP_BUILD_CONTRIB=OFF \
-DYAML_CPP_BUILD_TESTS=OFF \
-DYAML_CPP_BUILD_TOOLS=OFF \
&& cmake --build /tmp/yaml-cpp/build --target install -- -j"${BUILD_JOBS}" \
&& ldconfig \
&& rm -rf /tmp/ceres /tmp/yaml-cpp
RUN apt-get update && apt-get install -y --no-install-recommends \
python3-yaml \
&& rm -rf /var/lib/apt/lists/*
ENV TERM=xterm-256color
ENV QT_X11_NO_MITSHM=1
ENV LIBGL_ALWAYS_SOFTWARE=1
ENV XDG_RUNTIME_DIR=/tmp/rviz-runtime-root
ENV PATH=/opt/ros/humble/bin:/opt/ultrafusion/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PYTHONPATH=/opt/ros/humble/lib/python3.10/site-packages:/opt/ros/humble/local/lib/python3.10/dist-packages:/opt/ros/humble/lib/python3/dist-packages
ENV LD_LIBRARY_PATH=/opt/ultrafusion/lib:/opt/ros/humble/lib:/usr/local/lib
ENV AMENT_PREFIX_PATH=/opt/ros/humble
RUN echo 'source /opt/ros/humble/setup.bash' >/etc/profile.d/ros-humble.sh \
&& echo 'source /opt/ros/humble/setup.bash' >>/root/.bashrc \
&& mkdir -p /tmp/rviz-runtime-root \
&& chmod 700 /tmp/rviz-runtime-root
CMD ["/bin/bash"]