forked from NVlabs/Deep_Object_Pose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.kinetic
80 lines (68 loc) · 3.13 KB
/
Dockerfile.kinetic
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 nvidia/cudagl:10.0-devel-ubuntu16.04
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
# Full license terms provided in LICENSE.md file.
# Build with:
# docker build -t nvidia-dope:kinetic-v1 -f Dockerfile.kinetic ..
ENV HOME /root
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR ${HOME}
RUN apt-get update && apt-get -y --no-install-recommends install software-properties-common
RUN apt-get update && apt-get -y --no-install-recommends install \
ca-certificates \
build-essential \
cmake \
git \
libopencv-dev \
python-dev \
python-pip \
&& apt-get -y autoremove \
&& apt-get clean \
# pip
&& pip install setuptools==44.1.1 wheel \
# cleanup
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
# Install OpenCV with CUDA support.
# REVIEW alexeyk: JetPack 3.2 comes with OpenCV 3.3.1 _without_ CUDA support.
WORKDIR ${HOME}
RUN git clone http://github.com/opencv/opencv.git && cd opencv \
&& git checkout 3.3.1 \
&& mkdir build && cd build \
&& cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_CUDA=OFF \
-D WITH_OPENCL=OFF \
-D ENABLE_FAST_MATH=1 \
-D CUDA_FAST_MATH=1 \
-D WITH_CUBLAS=1 \
-D BUILD_DOCS=OFF \
-D BUILD_PERF_TESTS=OFF \
-D BUILD_TESTS=OFF \
.. \
&& make -j `nproc` \
&& make install \
&& cd ${HOME} && rm -rf ./opencv/
COPY requirements.txt ${HOME}
RUN pip install --no-cache-dir -r requirements.txt
# ROS Kinetic
# Use rosdep to install all dependencies (including ROS itself)
COPY package.xml ${HOME}/fake_ws/src/dope/
RUN apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 \
&& sh -c 'echo "deb http://packages.ros.org/ros/ubuntu xenial main" > /etc/apt/sources.list.d/ros-latest.list' \
&& apt-get update && apt-get install -y python-rosdep \
&& rosdep init \
&& rosdep update \
&& rosdep install --from-paths ${HOME}/fake_ws/src -i -y --rosdistro kinetic \
&& apt-get install -y ros-kinetic-rosbash ros-kinetic-ros-comm \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
# Setup catkin workspace
ENV CATKIN_WS ${HOME}/catkin_ws
COPY . ${CATKIN_WS}/src/dope
COPY docker/init_workspace.sh ${HOME}
RUN ${CATKIN_WS}/src/dope/docker/init_workspace.sh
RUN echo "source ${CATKIN_WS}/devel/setup.bash" >> ${HOME}/.bashrc
ENV DISPLAY :0
ENV TERM=xterm
# Some QT-Apps don't show controls without this
ENV QT_X11_NO_MITSHM 1