-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.fast_lio_localization
More file actions
86 lines (67 loc) · 2.77 KB
/
Dockerfile.fast_lio_localization
File metadata and controls
86 lines (67 loc) · 2.77 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
FROM ros:noetic
ENV ROS_DISTRO=noetic
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y software-properties-common locales && \
add-apt-repository universe
RUN locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
ENV LANG=en_US.UTF-8
# Create a non-root user
ARG USERNAME=local
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
# [Optional] Add sudo support for the non-root user
&& apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
&& chmod 0440 /etc/sudoers.d/$USERNAME \
# Cleanup
&& rm -rf /var/lib/apt/lists/* \
&& echo "source /usr/share/bash-completion/completions/git" >> /home/$USERNAME/.bashrc
RUN apt-get update \
&& apt-get install --no-install-recommends -y software-properties-common gnupg ca-certificates \
&& add-apt-repository ppa:apt-fast/stable \
&& apt-get update \
&& apt-get install --no-install-recommends -y apt-fast \
&& apt-fast clean \
&& rm -rf /var/lib/apt/lists/*
RUN echo debconf apt-fast/maxdownloads string 16 | debconf-set-selections && \
echo debconf apt-fast/dlflag boolean true | debconf-set-selections && \
echo debconf apt-fast/aptmanager string apt-get | debconf-set-selections
RUN apt-fast update \
&& apt-fast install -y --no-install-recommends \
git wget nano vim libomp-dev build-essential python3-pip
RUN apt-fast install -y --no-install-recommends \
ros-${ROS_DISTRO}-eigen-conversions \
ros-${ROS_DISTRO}-pcl-ros ros-${ROS_DISTRO}-rviz \
ros-${ROS_DISTRO}-tf2-geometry-msgs \
ros-${ROS_DISTRO}-tf2-sensor-msgs \
ros-${ROS_DISTRO}-diagnostic-updater \
ros-${ROS_DISTRO}-roslint \
ros-${ROS_DISTRO}-topic-tools
WORKDIR /dev_ws
RUN git clone https://github.com/Livox-SDK/Livox-SDK.git
WORKDIR /dev_ws/Livox-SDK/build
RUN cmake .. && make -j$(nproc) install
RUN apt-fast install -y --no-install-recommends \
ros-${ROS_DISTRO}-ros-numpy
RUN pip install pyrsistent==0.15
RUN pip install open3d==0.10
RUN apt-fast install -y --no-install-recommends \
python-is-python3
RUN mkdir -p /dev_ws/catkin_ws/src
WORKDIR /dev_ws/catkin_ws/src
RUN git clone https://github.com/Livox-SDK/livox_ros_driver.git
RUN git clone https://github.com/koide3/FAST_LIO_LOCALIZATION.git /dev_ws/catkin_ws/src/FAST_LIO_LOCALIZATION && \
cd /dev_ws/catkin_ws/src/FAST_LIO_LOCALIZATION && \
git submodule sync && \
git submodule update --init
WORKDIR /dev_ws/catkin_ws
RUN /bin/bash -c '. /opt/ros/${ROS_DISTRO}/setup.bash; catkin_make -DCMAKE_BUILD_TYPE=Release'
RUN sed -i "6i source \"/dev_ws/catkin_ws/devel/setup.bash\"" /ros_entrypoint.sh
WORKDIR /dev_ws
ENV QT_DEBUG_PLUGINS=1
CMD [ "bash" ]