-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
41 lines (36 loc) · 1.25 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
# This Dockerfile tries to be compatible with
# https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html#preparing-your-dockerfile
FROM jupyter/base-notebook:584f43f06586
# The gnuplot tool installed with Conda below requires libgl1-mesa-glx.
# Apparently, this cannot be fixed from within Anaconda for horrible reasons:
# https://github.com/conda-forge/pygridgen-feedstock/issues/10
# For all the other dependencies we try to stick with Anaconda for
# consistency and minimal disk space consumption!
USER root
RUN apt update && \
apt install --no-install-recommends --yes \
libgl1-mesa-glx && \
apt clean && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /opt/dune && chown -R ${NB_USER} /opt/dune
USER ${NB_USER}
# Install conda and its dependencies
RUN conda install -c conda-forge \
cmake \
cxxopts \
fortran-compiler \
gcc_linux-64 \
gnuplot \
make \
suitesparse \
superlu \
xeus-cling && \
conda clean -a -q -y
# Copying the repository into the Docker container
COPY --chown=${NB_UID} . /opt/dune
# Build the Dune kernel
WORKDIR /opt/dune
RUN ./bin/build-docker.sh
WORKDIR ${HOME}
# Populate the home directory with our notebooks.
RUN cp -r /opt/dune/notebooks/* ${HOME}