/
Dockerfile
54 lines (47 loc) · 1.42 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
FROM gtclang/dawn:latest
# setup jupyter lab user:
ARG NB_USER=jovyan
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV NB_UID ${NB_UID}
ENV HOME /home/${NB_USER}
ENV PATH="/usr/local/dawn/bin:${PATH}"
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
# copy repo files into docker container
COPY . ${HOME}
# setup things as root:
# (because bash doesn't support comments in multi-line commands,
# we use this weird `: '...'` syntax)
RUN \
apt-get update && \
: 'ffmpeg is required for animations in exercises' && \
: 'nodejs is required for the auto scroll extension' && \
apt-get install -y \
nodejs \
npm \
ffmpeg \
clang-format && \
: 'upgrade some pip stuff' && \
pip install --upgrade pip setuptools wheel && \
: 'install python dependencies' && \
pip install --no-cache-dir \
jupyterlab \
matplotlib \
dusk@git+https://github.com/dawn-ico/dusk.git && \
: 'Enable auto scroll extension' && \
jupyter labextension install @wallneradam/output_auto_scroll && \
: 'setup AtlasUtils' && \
cd ${HOME}/AtlasUtils/utils/ && \
chmod +x ./build_and_install.sh && \
./build_and_install.sh && \
chown -R ${NB_UID} ${HOME} && \
:
USER ${NB_USER}
WORKDIR ${HOME}/content
RUN \
: 'Trust all jupyter notebooks by defaults' && \
find . -name "*.ipynb" -type f | xargs -n1 jupyter trust && \
: