-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathDockerfile
56 lines (42 loc) · 1.86 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
55
FROM jupyter/base-notebook:latest
USER root
RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.2-linux-x86_64.tar.gz && \
tar -xvzf julia-1.10.2-linux-x86_64.tar.gz && \
mv julia-1.10.2 /opt/ && \
ln -s /opt/julia-1.10.2/bin/julia /usr/local/bin/julia && \
rm julia-1.10.2-linux-x86_64.tar.gz
ENV mainpath ./
RUN mkdir -p ${mainpath}
USER ${NB_USER}
COPY --chown=${NB_USER}:users ./src ${mainpath}/src
COPY --chown=${NB_USER}:users ./src/plutoserver ${mainpath}/plutoserver
RUN cp ${mainpath}/src/setup.py ${mainpath}/setup.py
RUN cp ${mainpath}/src/runpluto.sh ${mainpath}/runpluto.sh
RUN cp ${mainpath}/src/environment.yml ${mainpath}/environment.yml
RUN cp ${mainpath}/src/Project.toml ${mainpath}/Project.toml
ENV USER_HOME_DIR /home/${NB_USER}
ENV JULIA_PROJECT ${USER_HOME_DIR}
ENV JULIA_DEPOT_PATH ${USER_HOME_DIR}/.julia
RUN julia -e "import Pkg; Pkg.Registry.update();"
RUN julia -e "import Pkg; Pkg.instantiate();"
USER root
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential && \
apt-get install -y --no-install-recommends vim && \
apt-get install -y --no-install-recommends git-all && \
apt-get install -y --no-install-recommends unzip && \
apt-get install -y --no-install-recommends gfortran && \
apt-get install -y --no-install-recommends openmpi-bin && \
apt-get install -y --no-install-recommends libopenmpi-dev && \
apt-get install -y --no-install-recommends libnetcdf-dev && \
apt-get install -y --no-install-recommends libnetcdff-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/*
USER ${NB_USER}
RUN jupyter lab build && \
jupyter lab clean && \
pip install ${mainpath} --no-cache-dir && \
rm -rf ~/.cache
RUN julia ${mainpath}/src/warmup1.jl
RUN julia ${mainpath}/src/download_notebooks.jl
RUN mkdir .dev
RUN mv build plutoserver.egg-info .dev