-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
60 lines (50 loc) · 1.24 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
FROM osrf/ros:melodic-desktop-bionic
LABEL maintainer="eborghiorue@frba.utn.edu.ar"
ENV DEBIAN_FRONTEND noninteractive
# Install dependencies
RUN apt-get update && apt-get install -y \
software-properties-common
RUN add-apt-repository universe
RUN apt-get update && apt-get install -y \
apache2 \
curl \
git \
python3 \
python3-pip \
libgl1-mesa-dev \
x11-apps \
xorg \
xvfb
RUN pip3 install --upgrade pip
# install ros packages
RUN apt-get update && apt-get install -y \
ros-melodic-common-tutorials \
ros-melodic-ros-tutorials \
&& rm -rf /var/lib/apt/lists/*
# install jupyter and configure
RUN pip3 install \
bqplot \
ipykernel \
ipywidgets \
jupyterlab \
matplotlib \
notebook \
pyyaml
ENV NB_USER jovyan
ENV NB_UID 1000
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
# Make sure the contents of our repo are in ${HOME}
COPY . ${HOME}
USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_USER}
WORKDIR ${HOME}
ENV DISPLAY=:99.0
ENV QT_QPA_PLATFORM=offscreen
RUN /usr/bin/Xorg -depth 16&
# modify the CMD and start a background server first
CMD ["jupyter", "lab", "--no-browser", "--ip", "0.0.0.0"]