-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.liloc
More file actions
80 lines (69 loc) · 2.22 KB
/
Dockerfile.liloc
File metadata and controls
80 lines (69 loc) · 2.22 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
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 -y -q --no-install-recommends \
git \
vim \
build-essential \
cmake \
make \
gdb \
curl \
tmux \
vim \
libpcl-dev \
libeigen3-dev \
libopencv-dev \
libboost-all-dev \
libtbb-dev \
&& rm -rf /var/lib/apt/lists/*
# Install OpenCV 4.2
RUN apt-get update && apt-get install -y -q --no-install-recommends \
libopencv-dev=4.2.0+dfsg-5 \
ros-${ROS_DISTRO}-pcl-ros \
ros-${ROS_DISTRO}-cv-bridge \
ros-${ROS_DISTRO}-tf \
ros-${ROS_DISTRO}-rviz \
&& rm -rf /var/lib/apt/lists/*
# Install GTSAM 4.2 from source
RUN apt-get update && apt-get install -y -q --no-install-recommends \
libboost-all-dev \
libtbb-dev \
&& rm -rf /var/lib/apt/lists/* \
&& git clone https://github.com/borglab/gtsam.git /tmp/gtsam \
&& cd /tmp/gtsam \
&& git checkout 4.2 \
&& mkdir build && cd build \
&& cmake .. \
&& make -j$(nproc) \
&& make install \
&& rm -rf /tmp/gtsam
WORKDIR /dev_ws
RUN mkdir -p /dev_ws/src && cd /dev_ws/src && \
git clone https://github.com/koide3/ndt_omp && \
git clone https://github.com/Livox-SDK/livox_ros_driver && \
git clone https://github.com/Yixin-F/LiLoc
RUN /bin/bash -c '. /opt/ros/${ROS_DISTRO}/setup.bash; catkin_make -DCMAKE_BUILD_TYPE=Release'
RUN sed -i "6i source \"/dev_ws/devel/setup.bash\"" /ros_entrypoint.sh
ENV QT_DEBUG_PLUGINS=1
CMD [ "bash" ]