-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
114 lines (83 loc) · 3.08 KB
/
Dockerfile
File metadata and controls
114 lines (83 loc) · 3.08 KB
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
106
107
108
109
110
111
112
113
114
FROM ubuntu:18.04
################################## JUPYTERLAB ##################################
ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
RUN apt-get -o Acquire::ForceIPv4=true update && apt-get -yq dist-upgrade \
&& apt-get -o Acquire::ForceIPv4=true install -yq --no-install-recommends \
locales python-pip cmake \
python3-pip python3-setuptools git build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install jupyterlab bash_kernel \
&& python3 -m bash_kernel.install
ENV SHELL=/bin/bash \
NB_USER=jovyan \
NB_UID=1000 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8
ENV HOME=/home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
EXPOSE 8888
CMD ["jupyter", "lab", "--no-browser", "--ip=0.0.0.0", "--NotebookApp.token=''"]
###################################### ROS #####################################
# install packages
RUN apt-get -o Acquire::ForceIPv4=true update && apt-get -o Acquire::ForceIPv4=true install -q -y \
dirmngr \
gnupg2 \
lsb-release \
&& 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 `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list
# install bootstrap tools
RUN apt-get -o Acquire::ForceIPv4=true update && apt-get -o Acquire::ForceIPv4=true install --no-install-recommends -y \
python-rosdep \
python-rosinstall \
python-vcstools \
python-catkin-tools \
&& rm -rf /var/lib/apt/lists/*
# bootstrap rosdep
RUN rosdep init \
&& rosdep update
# install ros packages
ENV ROS_DISTRO melodic
RUN apt-get -o Acquire::ForceIPv4=true update && apt-get -o Acquire::ForceIPv4=true install -y \
ros-melodic-ros-base=1.4.1-0* \
&& rm -rf /var/lib/apt/lists/*
# setup entrypoint
COPY ./ros_entrypoint.sh /
ENTRYPOINT ["/ros_entrypoint.sh"]
##################################### APT ######################################
RUN apt-get -o Acquire::ForceIPv4=true update \
&& apt-get -o Acquire::ForceIPv4=true install -yq --no-install-recommends \
ros-melodic-ros-tutorials \
ros-melodic-common-tutorials \
ros-melodic-tf2 \
ros-melodic-tf2-tools \
ros-melodic-tf2-ros \
ros-melodic-tf-conversions \
ros-melodic-turtle-tf2 \
xvfb=2:1.19.6-1ubuntu4 \
x11-apps=7.7+6ubuntu1 \
netpbm=2:10.0-15.3build1 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
##################################### PIP ######################################
RUN pip install \
ipykernel \
ipython \
matplotlib
##################################### COPY #####################################
RUN mkdir ${HOME}/rosin-tutorials
COPY . ${HOME}/rosin-tutorials
################################### CUSTOM #####################################
RUN python -m ipykernel install
##################################### TAIL #####################################
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_USER}
WORKDIR ${HOME}/rosin-tutorials