forked from udacity/CarND-Capstone
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile-gpu
105 lines (82 loc) · 3.05 KB
/
Dockerfile-gpu
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Docker image for CarND Capstone - GPU
FROM nvidia/cuda:8.0-cudnn6-devel-ubuntu16.04
# ros kinetic for ubuntu xenial
# ros-core
# install packages
RUN apt-get update && apt-get install -y --no-install-recommends \
dirmngr \
gnupg2 \
&& rm -rf /var/lib/apt/lists/*
# setup keys
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116
# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu xenial main" > /etc/apt/sources.list.d/ros-latest.list
# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
python-rosdep \
python-rosinstall \
python-vcstools \
&& rm -rf /var/lib/apt/lists/*
# setup environment
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
# bootstrap rosdep
RUN rosdep init \
&& rosdep update
# install ros packages
ENV ROS_DISTRO kinetic
RUN apt-get update && apt-get install -y \
ros-kinetic-ros-core=1.3.1-0* \
&& rm -rf /var/lib/apt/lists/*
# ros-base
# install ros packages
RUN apt-get update && apt-get install -y \
ros-kinetic-ros-base=1.3.1-0* \
&& rm -rf /var/lib/apt/lists/*
# ros-robot
# install ros packages
RUN apt-get update && apt-get install -y \
ros-kinetic-robot=1.3.1-0* \
&& rm -rf /var/lib/apt/lists/*
# Install Dataspeed DBW https://goo.gl/KFSYi1 from binary
# adding Dataspeed server to apt
RUN sh -c 'echo "deb [ arch=amd64 ] http://packages.dataspeedinc.com/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-dataspeed-public.list'
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FF6D3CDA
RUN apt-get update
# setup rosdep
RUN sh -c 'echo "yaml http://packages.dataspeedinc.com/ros/ros-public-'$ROS_DISTRO'.yaml '$ROS_DISTRO'" > /etc/ros/rosdep/sources.list.d/30-dataspeed-public-'$ROS_DISTRO'.list'
RUN rosdep update
RUN apt-get install -y ros-$ROS_DISTRO-dbw-mkz
# RUN apt-get upgrade -y
# end installing Dataspeed DBW
# install python packages
RUN apt-get install -y python-pip
COPY requirements-gpu.txt ./requirements.txt
RUN pip install -r requirements.txt
# install required ros dependencies
RUN apt-get update && apt-get install -y \
ros-$ROS_DISTRO-cv-bridge \
ros-$ROS_DISTRO-pcl-ros \
ros-$ROS_DISTRO-image-proc
# socket io
RUN apt-get install -y netbase
# development: everyone needs editors and git
RUN apt-get install -y vim nano git
# development: tensorflow object detection
RUN apt-get update \
&& apt-get install -y protobuf-compiler python-pil python-lxml python-tk
RUN pip install pillow lxml tqdm pyyaml matplotlib sklearn
# note the path to tensorflow
WORKDIR /opt/tensorflow
RUN git clone --progress https://github.com/tensorflow/models.git
RUN cd /opt/tensorflow/models/research \
&& protoc object_detection/protos/*.proto --python_out=. \
&& python setup.py sdist \
&& (cd slim && python setup.py sdist)
ENV PYTHONPATH=$PYTHONPATH:/opt/tensorflow/models/research:/opt/tensorflow/models/research/slim
# udacity capstone
RUN mkdir /capstone
VOLUME ["/capstone"]
VOLUME ["/root/.ros/log/"]
WORKDIR /udacity/
RUN pip install jupyter