-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
57 lines (45 loc) · 1.48 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
56
57
FROM julia:1.9.1
RUN apt-get update && \
apt-get install -y \
build-essential \
cmake \
curl \
ca-certificates \
xvfb \
dvipng \
texlive-latex-recommended \
r-base \
zip \
libxt6 libxrender1 libxext6 libgl1-mesa-glx libqt5widgets5 && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Setup Rust
# Reference: https://github.com/rust-lang/rustup/issues/297
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH /root/.cargo/bin:$PATH
ENV GKSwstype=100
ENV JULIA_NUM_THREADS=8
ENV PYTHON=""
RUN julia -e 'using Pkg; \
Pkg.add(["PyCall", "Conda"]); using PyCall, Conda;\
using Conda; Conda.add(["matplotlib", "sympy", "numpy", "numba" ]); \
Pkg.add(["Documenter", "Literate", "Weave", "Franklin", "NodeJS", "Remark"]); \
'
RUN julia -e "using NodeJS; run(\`\$(npm_cmd()) install highlight.js\`); using Franklin"
# Add conda's path
ENV PATH /root/.julia/conda/3/bin:$PATH
RUN julia -e 'using Pkg; pkg"add RCall"; Pkg.build("RCall"); using RCall'
# set "/work" as default project directory
WORKDIR /work
ENV JULIA_PROJECT=/work
# Install Julia Package
COPY Project.toml /work
COPY ./src/MyUtils.jl /work/src/MyUtils.jl
# Initialize Julia package using /work/Project.toml
RUN rm -f /work/Manifest.toml && julia --project=/work -e 'using Pkg; \
Pkg.instantiate(); \
Pkg.precompile()' && \
# Check Julia version \
julia -e 'using InteractiveUtils; versioninfo()'
# For Http Server
EXPOSE 8000
CMD ["julia"]