1
- # Specify parent image. Please select a fixed tag here.
2
- ARG BASE_IMAGE=rwthika/acdc-notebooks:rwth-courses
3
- FROM ${BASE_IMAGE}
1
+ FROM jupyter/minimal-notebook:lab-3.1.4
2
+
3
+ USER root
4
+
5
+ # Install all OS dependencies for fully functional notebook server
6
+ RUN apt-get update --yes && \
7
+ apt-get install --yes --no-install-recommends \
8
+ vim-tiny \
9
+ git \
10
+ inkscape \
11
+ libsm6 \
12
+ libxext-dev \
13
+ libxrender1 \
14
+ lmodern \
15
+ netcat \
16
+ openssh-client \
17
+ # ---- nbconvert dependencies ----
18
+ texlive-xetex \
19
+ texlive-fonts-recommended \
20
+ texlive-plain-generic \
21
+ # ----
22
+ tzdata \
23
+ unzip \
24
+ nano-tiny && \
25
+ apt-get clean && rm -rf /var/lib/apt/lists/*
26
+
27
+ # Create alternative for nano -> nano-tiny
28
+ RUN update-alternatives --install /usr/bin/nano nano /bin/nano-tiny 10
29
+
30
+ RUN apt-get update && \
31
+ apt install -y git
32
+
33
+ USER ${NB_USER}
34
+
35
+ RUN pip install \
36
+ 'jupyterlab_iframe==0.4.0' \
37
+ 'git+https://github.com/stv0g/nbgitpuller@f735265f7b2a429a17a8fab70cfd3557f060640d' \
38
+ 'rwth-nb==0.1.8'
39
+
40
+ RUN conda install --name base --no-update-deps \
41
+ 'conda==4.10.3' && \
42
+ conda install --name base --quiet --yes --no-update-deps \
43
+ 'jupyterlab-git==0.32.1' \
44
+ 'ujson==4.0.2' \
45
+ 'ipywidgets==7.6.3' \
46
+ 'ipympl==0.7.0' \
47
+ 'matplotlib-base==3.4.3' && \
48
+ conda clean --all
49
+
50
+
51
+ RUN conda install --name base --quiet --yes --no-update-deps \
52
+ 'jupyterlab_widgets' \
53
+ 'jupyterlab-drawio==0.9.0' \
54
+ 'jupyterlab_iframe==0.4.0' \
55
+ 'jupyterlab_latex=3.0.0' && \
56
+ conda clean --all
57
+
58
+ # Workaround LaTex
59
+ RUN git clone https://github.com/joequant/jupyterlab-latex /tmp/jupyterlab-latex && cd /tmp/jupyterlab-latex && git checkout cbb66825786ecf11a35fd92df797f8ccee719ad4 && pip install -ve .
60
+ RUN jupyter lab build
61
+
62
+
63
+ USER root
64
+
65
+ # Use RWTH Mirror
66
+ # RUN sed -i 's|http://archive.ubuntu.com|http://ftp.halifax.rwth-aachen.de|g' /etc/apt/sources.list
67
+
68
+ RUN apt-get update && \
69
+ apt-get -y install \
70
+ language-pack-de \
71
+ texlive-latex-recommended \
72
+ openssh-client && \
73
+ rm -rf /var/lib/apt/lists/*
74
+
75
+ # Add more locales
76
+ RUN locale-gen de_DE && \
77
+ locale-gen de_DE.UTF-8 && \
78
+ update-locale
79
+
80
+ USER ${NB_USER}
81
+
82
+ ENV JUPYTER_ENABLE_LAB=yes
83
+
84
+ # Until HERE RWTH BASE IMAGE
4
85
5
86
# Install cv2
6
87
USER root
@@ -19,7 +100,6 @@ RUN apt-get update && \
19
100
python3-opencv \
20
101
&& rm -rf /var/lib/apt/lists/*
21
102
22
- RUN pip install opencv-python
23
103
24
104
# Install ROS
25
105
RUN echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list
@@ -45,6 +125,7 @@ RUN apt-get update && \
45
125
ros-noetic-rosbridge-server \
46
126
ros-noetic-rosbridge-suite \
47
127
ros-noetic-tf2-web-republisher \
128
+ ros-noetic-actionlib \
48
129
libboost-dev \
49
130
libeigen3-dev \
50
131
libgeographic-dev \
@@ -54,7 +135,6 @@ RUN apt-get update && \
54
135
python3-catkin-pkg \
55
136
python3-rospkg \
56
137
python3-empy \
57
- ros-noetic-actionlib \
58
138
python3-osrf-pycommon \
59
139
python3-wstool \
60
140
&& rm -rf /var/lib/apt/lists/*
@@ -69,6 +149,14 @@ RUN git clone https://github.com/fzi-forschungszentrum-informatik/Lanelet2 /lane
69
149
70
150
USER jovyan
71
151
152
+ ARG TARGETPLATFORM
153
+
154
+ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
155
+ pip install tensorflow-gpu==2.10.0 ; \
156
+ elif [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \
157
+ python -m pip install tensorflow-macos ; \
158
+ fi
159
+
72
160
# Install packages via requirements.txt
73
161
ADD requirements.txt .
74
162
RUN pip install -r requirements.txt
@@ -101,6 +189,3 @@ RUN pip install jupyterlab-zethus
101
189
RUN jupyter nbextension install --py --symlink --sys-prefix jupyros
102
190
RUN jupyter nbextension enable --py --sys-prefix jupyros
103
191
RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension
104
-
105
-
106
-
0 commit comments