Skip to content
This repository was archived by the owner on Nov 4, 2022. It is now read-only.

Commit 9249c7d

Browse files
authored
Reorder package caching
1 parent 0a67339 commit 9249c7d

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

Dockerfile

+20-23
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,22 @@ RUN apt-get update && \
2323

2424
ENV JULIA_PKGDIR /root/.julia/v0.6
2525

26-
# Pre-compiling packages within a Julia session doesn't seem to work at the moment.
27-
RUN julia /tmp/package_installs.jl && \
28-
julia -e "Base.compilecache(\"BinDeps\")" && \
26+
RUN julia /tmp/package_installs.jl
27+
28+
# IJulia
29+
RUN apt-get update && apt-get install -y python3-pip python3-dev && pip3 install jupyter && \
30+
julia -e "Pkg.add(\"Nettle\")" && \
31+
julia -e "Pkg.add(\"IJulia\")" && \
32+
julia -e "Pkg.build(\"IJulia\")" && \
33+
# Make sure Jupyter won't try to migrate old settings
34+
mkdir -p /root/.jupyter/kernels && \
35+
cp -r /root/.local/share/jupyter/kernels/julia-0.6 /root/.jupyter/kernels && \
36+
touch /root/.jupyter/jupyter_nbconvert_config.py && touch /root/.jupyter/migrated && \
37+
julia -e "Base.compilecache(\"IJulia\")" && \
38+
julia -e "Base.compilecache(\"ZMQ\")" && \
39+
julia -e "Base.compilecache(\"Nettle\")"
40+
41+
RUN julia -e "Base.compilecache(\"BinDeps\")" && \
2942
julia -e "Base.compilecache(\"Cairo\")" && \
3043
julia -e "Base.compilecache(\"Calculus\")" && \
3144
julia -e "Base.compilecache(\"Clustering\")" && \
@@ -55,25 +68,9 @@ RUN julia /tmp/package_installs.jl && \
5568
julia -e "Base.compilecache(\"TextAnalysis\")" && \
5669
julia -e "Base.compilecache(\"TimeSeries\")" && \
5770
julia -e "Base.compilecache(\"ZipFile\")" && \
58-
julia -e "Base.compilecache(\"Gadfly\")"
59-
60-
RUN julia -e "Base.compilecache(\"MLBase\")" && \
61-
julia -e "Base.compilecache(\"Clustering\")"
62-
63-
64-
# IJulia
65-
RUN apt-get update && apt-get install -y python3-pip python3-dev && pip3 install jupyter && \
66-
julia -e "Pkg.add(\"Nettle\")" && \
67-
julia -e "Pkg.add(\"IJulia\")" && \
68-
julia -e "Pkg.build(\"IJulia\")" && \
69-
# Make sure Jupyter won't try to migrate old settings
70-
mkdir -p /root/.jupyter/kernels && \
71-
cp -r /root/.local/share/jupyter/kernels/julia-0.6 /root/.jupyter/kernels && \
72-
touch /root/.jupyter/jupyter_nbconvert_config.py && touch /root/.jupyter/migrated && \
73-
julia -e "Base.compilecache(\"IJulia\")" && \
74-
julia -e "Base.compilecache(\"ZMQ\")" && \
75-
julia -e "Base.compilecache(\"Nettle\")" && \
76-
julia -e "using IJulia"
77-
71+
julia -e "Base.compilecache(\"Gadfly\")" && \
72+
julia -e "Base.compilecache(\"MLBase\")" && \
73+
julia -e "Base.compilecache(\"Clustering\")" && \
74+
julia -e "using IJulia"
7875

7976
CMD ["julia"]

0 commit comments

Comments
 (0)