-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
43 lines (33 loc) · 1.43 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
FROM jupyter/base-notebook:latest
USER root
RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.0-linux-x86_64.tar.gz && \
tar -xvzf julia-1.6.0-linux-x86_64.tar.gz && \
mv julia-1.6.0 /opt/ && \
ln -s /opt/julia-1.6.0/bin/julia /usr/local/bin/julia && \
rm julia-1.6.0-linux-x86_64.tar.gz
USER ${NB_USER}
COPY --chown=${NB_USER}:users ./plutoserver ./plutoserver
COPY --chown=${NB_USER}:users ./environment.yml ./environment.yml
COPY --chown=${NB_USER}:users ./setup.py ./setup.py
COPY --chown=${NB_USER}:users ./runpluto.sh ./runpluto.sh
COPY --chown=${NB_USER}:users ./notebooks ./notebooks
COPY --chown=${NB_USER}:users ./Project.toml ./Project.toml
COPY --chown=${NB_USER}:users ./Manifest.toml ./Manifest.toml
COPY --chown=${NB_USER}:users ./warmup.jl ./warmup.jl
COPY --chown=${NB_USER}:users ./create_sysimage.jl ./create_sysimage.jl
ENV USER_HOME_DIR /home/${NB_USER}
ENV JULIA_PROJECT ${USER_HOME_DIR}
ENV JULIA_DEPOT_PATH ${USER_HOME_DIR}/.julia
WORKDIR ${USER_HOME_DIR}
RUN julia -e "import Pkg; Pkg.Registry.update(); Pkg.instantiate();"
USER root
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN julia create_sysimage.jl
USER ${NB_USER}
RUN jupyter labextension install @jupyterlab/server-proxy && \
jupyter lab build && \
jupyter lab clean && \
pip install . --no-cache-dir && \
rm -rf ~/.cache