-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
41 lines (32 loc) · 1.1 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
FROM ubuntu:focal
ENV JULIA_VERSION 1.6.5
ENV JULIA_DEPOT_PATH /.julia
# Install the build dependencies
RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
git \
ca-certificates \
build-essential
# Install Julia
RUN \
cd / \
&& curl -L "https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-${JULIA_VERSION}-linux-x86_64.tar.gz" | tar xvz \
&& ln -s /julia-${JULIA_VERSION}/bin/julia /usr/bin/julia
# Install PackageCompiler.jl
RUN \
julia -e 'using Pkg; Pkg.add("PackageCompiler")'
# Copy HapLink.jl
COPY . /HapLink.jl
# Clone and build HapLink.jl
RUN \
cd /HapLink.jl \
&& git clean -dfx \
&& julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate()' \
&& julia -e 'using PackageCompiler; create_app(".", "build", precompile_execution_file="precompile_app.jl", executables=["haplink" => "haplink"], cpu_target="x86-64")'
FROM ubuntu:focal
COPY --from=0 /HapLink.jl/build/bin /usr/bin
COPY --from=0 /HapLink.jl/build/lib /usr/lib
COPY --from=0 /HapLink.jl/build/share /usr/share
ENTRYPOINT ["/usr/bin/haplink"]