forked from 2i2c-org/hub-user-image-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (22 loc) · 1.01 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
FROM pangeo/ml-notebook
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
USER root
ENV DEBIAN_FRONTEND=noninteractive
ENV PATH ${NB_PYTHON_PREFIX}/bin:$PATH
RUN apt-get update -qq --yes > /dev/null && \
apt-get install --yes -qq curl > /dev/null
ENV JULIA_VERSION 1.10.3
ENV JULIA_PATH /srv/julia
ENV JULIA_DEPOT_PATH ${JULIA_PATH}/pkg
ENV PATH $PATH:${JULIA_PATH}/bin
RUN mkdir -p ${JULIA_PATH}
RUN curl -sSL "https://julialang-s3.julialang.org/bin/linux/x64/${JULIA_VERSION%[.-]*}/julia-${JULIA_VERSION}-linux-x86_64.tar.gz" \
| tar -xz -C ${JULIA_PATH} --strip-components 1
RUN mkdir -p ${JULIA_DEPOT_PATH} \
&& chown ${NB_UID}:${NB_UID} ${JULIA_DEPOT_PATH}
USER ${NB_USER}
RUN export JUPYTER_DATA_DIR="$NB_PYTHON_PREFIX/share/jupyter" \
&& julia --eval 'using Pkg; Pkg.add("IJulia"); using IJulia; installkernel("Julia");' \
&& julia --eval 'using Pkg; pkg"add CloudMicrophysics"; Pkg.add(["PyCall"]);' \
&& julia --eval 'using Pkg; Pkg.instantiate(); Pkg.resolve(); pkg"precompile"'