-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·81 lines (72 loc) · 1.94 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
FROM nvidia/cudagl:10.2-devel-ubuntu18.04
#FROM ros:melodic-ros-core
WORKDIR /root
# avoid blocking in installation of tzdata
ENV DEBIAN_FRONTEND=noninteractive
ARG ROS_DISTRO=melodic
RUN apt-get update && apt install -y \
wget \
lsb-release \
net-tools \
git \
build-essential \
cmake \
pkg-config \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*rm
# Install ROS
# Add key
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' && \
apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
#
# Install necessary packages
#
RUN apt-get update && apt-get install -y \
libusb-1.0-0-dev \
libturbojpeg \
libturbojpeg0-dev \
libjpeg-turbo8-dev \
libglfw3-dev \
libopenni2-dev \
freeglut3-dev \
uuid-dev \
libsdl2-dev \
usbutils \
python-catkin-tools \
python-rosdep \
alsa-utils \
ros-${ROS_DISTRO}-ros-core \
ros-${ROS_DISTRO}-vision-opencv \
ros-${ROS_DISTRO}-nodelet-core \
ros-${ROS_DISTRO}-perception-pcl \
ros-${ROS_DISTRO}-compressed-depth-image-transport \
ros-${ROS_DISTRO}-compressed-image-transport \
ros-${ROS_DISTRO}-geometry \
ros-${ROS_DISTRO}-depth-image-proc \
python-opencv \
libopencv-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*rm
#
# Initialize the ROS environment
#
RUN rosdep init && rosdep update
#
# Build and install libfreenect2
#
RUN git clone https://github.com/OpenKinect/libfreenect2.git
RUN cd libfreenect2 \
&& mkdir build \
&& cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/freenect2 -DENABLE_CXX11=ON -DENABLE_CUDA=off \
&& make -j8 \
&& make install \
&& mkdir -p /etc/udev/rules.d/ \
&& cp ../platform/linux/udev/90-kinect2.rules /etc/udev/rules.d/
RUN chmod a+rwx /etc/udev/rules.d
#
# Entrypoint
#
COPY ./ros_entrypoint.sh /ros_entrypoint.sh
RUN chmod +x /ros_entrypoint.sh
ENTRYPOINT ["/ros_entrypoint.sh"]