forked from RobotecAI/RobotecGPULidar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
87 lines (67 loc) · 2.39 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
FROM nvidia/cuda:11.7.1-devel-ubuntu22.04
ARG DEBIAN_FRONTEND=noninteractive
ENV RGL_IS_BUILDING_DOCKER_IMAGE True
RUN apt update
RUN apt install -y \
cmake \
git
##### PCL extension #####
# Install vcpkg dependencies
RUN apt install -y \
curl \
zip \
unzip \
tar \
pkg-config \
freeglut3-dev \
libglew-dev \
libglfw3-dev \
python3
# Install RGL PCL dependencies via vcpkg
COPY setup.py /
RUN /setup.py --install-pcl-deps
RUN rm /setup.py
##### ROS2 extension #####
# Setup timezone
RUN echo 'Etc/UTC' > /etc/timezone && \
ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
apt-get update && \
apt-get install -q -y --no-install-recommends tzdata && \
rm -rf /var/lib/apt/lists/*
# Install packages
RUN apt-get update && apt-get install -q -y --no-install-recommends \
dirmngr \
gnupg2 \
&& rm -rf /var/lib/apt/lists/*
# Setup sources.list
RUN echo "deb http://packages.ros.org/ros2/ubuntu jammy main" > /etc/apt/sources.list.d/ros2-latest.list
# Setup keys
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
# Setup environment
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV ROS_DISTRO humble
# Install ros2 packages
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-humble-ros-core=0.10.0-1* \
&& rm -rf /var/lib/apt/lists/*
# Install packages for --install-ros2-deps
RUN apt-get update && apt-get install -y --no-install-recommends \
python3-colcon-common-extensions
# Install RGL ROS2 dependencies (e.g. radar_msgs)
COPY setup.py /
RUN /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash; /setup.py --install-ros2-deps" # ROS2 must be sourced before installing deps
RUN rm /setup.py
# Install required packages for RGL ROS2 standalone build (may be moved to setup.py in the future)
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-${ROS_DISTRO}-cyclonedds ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
ros-${ROS_DISTRO}-fastrtps ros-${ROS_DISTRO}-rmw-fastrtps-cpp \
patchelf
# Install required packages for UDP-ROS2 integration test
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-${ROS_DISTRO}-velodyne-driver ros-${ROS_DISTRO}-velodyne-pointcloud \
psmisc # for `killall` command
##### Post-build configuration #####
WORKDIR /code
RUN git config --system --add safe.directory /code
CMD [ "/bin/bash" ]