forked from udacity/CarND-Capstone
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
62 lines (48 loc) · 2.22 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
# Udacity capstone project dockerfile
FROM ros:kinetic-robot
LABEL maintainer="[email protected]"
# 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 protobuf-compiler python-pil python-lxml python-tk
RUN pip install --no-cache-dir Cython
COPY requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# install required ros dependencies
RUN apt-get install -y ros-$ROS_DISTRO-cv-bridge
RUN apt-get install -y ros-$ROS_DISTRO-pcl-ros
RUN apt-get install -y ros-$ROS_DISTRO-image-proc
# socket io
RUN apt-get install -y netbase
# other tools
RUN apt-get install -y vim less mc screen
# see: https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md
# Tensorflow Object Detection API installation
RUN git clone https://github.com/tensorflow/models.git tensorflow_models
ENV TENSORFLOW_MODELS ${PWD}/tensorflow_models
## COCO API installation
RUN git clone https://github.com/cocodataset/cocoapi.git cocodataset_cocoapi
ENV COCODATASET_COCOAPI ${PWD}/cocodataset_cocoapi
RUN cd ${COCODATASET_COCOAPI}/PythonAPI && \
make && \
cp -r pycocotools ${TENSORFLOW_MODELS}/research/
RUN cd ${TENSORFLOW_MODELS}/research && \
protoc object_detection/protos/*.proto --python_out=.
# Add Libraries to PYTHONPATH
ENV PYTHONPATH ${PYTHONPATH}${TENSORFLOW_MODELS}/research:${TENSORFLOW_MODELS}/research/slim
RUN apt-get autoclean
RUN apt-get clean
RUN apt-get autoremove
RUN mkdir /capstone
VOLUME ["/capstone"]
VOLUME ["/root/.ros/log/"]
WORKDIR /capstone/ros