-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (41 loc) · 1.3 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
# Indicate the Intel OneApi reference image
FROM intel/oneapi-hpckit:2022.1.2-devel-ubuntu18.04
ENV LAST_UPDATED=2022-03-01
ARG NB_USER="jovyan"
ARG NB_UID="1000"
ARG NB_GID="100"
# Fix DL4006
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install JupyterLab
USER root
RUN chmod 777 /tmp && \
apt-get update --yes && \
DEBIAN_FRONTEND="noninteractive" && \
# Install required python packages
# - sympy, see https://savannah.gnu.org/bugs/?58491
pip3 install --upgrade --no-cache-dir \
jupyterlab \
jupytext \
jupyter-book \
ghp-import \
numpy \
networkx && \
apt-get --yes clean && \
apt-get --yes autoremove && \
rm -Rf /var/lib/apt/lists/*
# Configure environment
ENV SHELL=/bin/bash \
NB_USER="${NB_USER}" \
NB_UID=${NB_UID} \
NB_GID=${NB_GID} \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
HOME="/home/${NB_USER}"
# Make sure the contents of our repo are in ${HOME}
COPY . ${HOME}
USER root
RUN chown -R ${NB_UID} ${HOME}
# Switch back to jovyan to avoid accidental container runs as root
USER ${NB_UID}
WORKDIR "${HOME}"