-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (50 loc) · 2.3 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
FROM ros:kinetic
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
RUN apt update -qq \
&& sudo apt-get install -y -qq software-properties-common \
&& sudo apt-get install -y -qq curl figlet wget\
&& sudo apt-get install -y -qq vim \
&& sudo apt-get install -y -qq nmap
RUN sudo rm -rf /etc/ros/rosdep/sources.list.d/* \
&& sudo rosdep init -q \
&& sudo rosdep update -q \
&& sudo apt install -y -qq python-rosinstall python-wstool build-essential python-catkin-tools python-pip \
&& sudo pip install catkin_pkg empy \
&& sudo rm -rf /var/lib/apt/lists/*
RUN sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu xenial main\" > /etc/apt/sources.list.d/ros-latest.list" \
&& sudo curl -sSL 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654' | sudo apt-key add - \
&& sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE \
&& sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u \
&& sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u \
&& sudo add-apt-repository ppa:nilarimogard/webupd8 -u
ENV ROBOT=youbot-brsu-4
ENV ROBOT_ENV=brsu-c025
COPY install_script.sh /
RUN chmod +x /install_script.sh && /install_script.sh
# OpenCV installation
RUN wget https://github.com/opencv/opencv/archive/2.4.13.3.zip \
&& unzip 2.4.13.3.zip \
&& mkdir /opencv-2.4.13.3/cmake_binary \
&& cd /opencv-2.4.13.3/cmake_binary \
&& cmake -DWITH_QT=OFF \
-DWITH_OPENGL=ON \
-DFORCE_VTK=OFF \
-DWITH_TBB=ON \
-DWITH_GDAL=ON \
-DWITH_XINE=ON \
-DBUILD_EXAMPLES=OFF \
-DENABLE_PRECOMPILED_HEADERS=OFF .. \
&& make install \
&& rm /2.4.13.3.zip \
&& rm -r /opencv-2.4.13.3
ARG UNAME=kinetic_user
ARG UID=1000
ARG GID=1000
RUN groupadd -g $GID -o $UNAME
RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME \
&& adduser $UNAME sudo \
&& echo "$UNAME ALL=(ALL:ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/$UNAME
USER $UNAME