Skip to content

Commit bffa9b8

Browse files
update docker setup
1 parent 5281617 commit bffa9b8

File tree

3 files changed

+95
-10
lines changed

3 files changed

+95
-10
lines changed

docker/Dockerfile

Lines changed: 93 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,87 @@
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
485

586
# Install cv2
687
USER root
@@ -19,7 +100,6 @@ RUN apt-get update && \
19100
python3-opencv \
20101
&& rm -rf /var/lib/apt/lists/*
21102

22-
RUN pip install opencv-python
23103

24104
# Install ROS
25105
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 && \
45125
ros-noetic-rosbridge-server \
46126
ros-noetic-rosbridge-suite \
47127
ros-noetic-tf2-web-republisher \
128+
ros-noetic-actionlib \
48129
libboost-dev \
49130
libeigen3-dev \
50131
libgeographic-dev \
@@ -54,7 +135,6 @@ RUN apt-get update && \
54135
python3-catkin-pkg \
55136
python3-rospkg \
56137
python3-empy \
57-
ros-noetic-actionlib \
58138
python3-osrf-pycommon \
59139
python3-wstool \
60140
&& rm -rf /var/lib/apt/lists/*
@@ -69,6 +149,14 @@ RUN git clone https://github.com/fzi-forschungszentrum-informatik/Lanelet2 /lane
69149

70150
USER jovyan
71151

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+
72160
# Install packages via requirements.txt
73161
ADD requirements.txt .
74162
RUN pip install -r requirements.txt
@@ -101,6 +189,3 @@ RUN pip install jupyterlab-zethus
101189
RUN jupyter nbextension install --py --symlink --sys-prefix jupyros
102190
RUN jupyter nbextension enable --py --sys-prefix jupyros
103191
RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension
104-
105-
106-

docker/docker_build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/bin/sh
22
#docker buildx create --use
3+
34
docker buildx build \
4-
--push \
55
--platform linux/amd64,linux/arm64 \
66
--cache-from type=registry,ref=rwthika/acdc-notebooks:latest \
77
--tag rwthika/acdc-notebooks:latest \
8+
--output type=docker \
89
.

docker/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
tensorflow-gpu==2.10.0
21
tensorflow-addons
32
tensorflow-datasets
43
matplotlib

0 commit comments

Comments
 (0)