/
Dockerfile
37 lines (30 loc) · 1.12 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
FROM jupyter/scipy-notebook:a644bde79fcf
USER root
RUN apt-get update -y && \
apt-get install -y --no-install-recommends software-properties-common && \
add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
apt-get update -y && \
apt-get install -y --no-install-recommends build-essential \
gcc-9>=9.1.0 \
gfortran-9>=9.1.0 \
g++-9>=9.1.0 \
${transientBuildDeps} && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-9 && \
update-alternatives --set gcc "/usr/bin/gcc-9" && \
gcc --version && \
gfortran --version && \
apt-get clean && \
apt-get purge -y --auto-remove ${transientBuildDeps} && \
rm -rf /var/lib/apt/lists/* /var/log/* /tmp/*
ARG NB_USER
ARG NB_UID
ENV USER ${NB_USER}
ENV HOME /home/${NB_USER}
USER ${NB_USER}
RUN cd ${HOME} && \
git clone https://github.com/f66blog/binder_gf9.git && \
cd binder_gf9 && \
pip install --user ./jupyter-gfort-kernel && \
jupyter kernelspec install ./jupyter-gfort-kernel/gfort_spec --user
WORKDIR ${HOME}/binder_gf9