-
-
Save ImreSamu/235daa6426076d5167a0774ea96c0cb0 to your computer and use it in GitHub Desktop.
julia package dockerfile https://discourse.julialang.org/t/slow-julia-startup-time-after-sysimage-creation/44102
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM julia:1.5 | |
RUN apt-get update \ | |
&& apt-get install -y \ | |
build-essential \ | |
cmake \ | |
gfortran \ | |
git \ | |
libatomic1 \ | |
m4 \ | |
perl \ | |
pkg-config \ | |
python \ | |
wget | |
RUN julia -e 'using Pkg; Pkg.add([ \ | |
"Revise","JuliaFormatter", \ | |
"LanguageServer", \ | |
"PackageCompiler", \ | |
"EllipsisNotation", "Parameters", "JSON2", \ | |
"Distributions", \ | |
"OhMyREPL", \ | |
"Plots", \ | |
"Flux","Zygote" \ | |
])' | |
# Do Ahead of Time Compilation using PackageCompiler | |
RUN julia --trace-compile="traced.jl" \ | |
-e 'using \ | |
Revise, JuliaFormatter, \ | |
LanguageServer, \ | |
PackageCompiler, \ | |
EllipsisNotation, Parameters, JSON2, \ | |
Distributions, \ | |
OhMyREPL, \ | |
Plots, \ | |
Flux, Zygote' | |
RUN julia -e 'using PackageCompiler; \ | |
PackageCompiler.create_sysimage([ \ | |
:Revise, :JuliaFormatter, \ | |
:LanguageServer, \ | |
:PackageCompiler, \ | |
:EllipsisNotation, :Parameters, :JSON2, \ | |
:Distributions, \ | |
:OhMyREPL, \ | |
:Plots, \ | |
:Flux, :Zygote \ | |
]; precompile_statements_file="traced.jl", replace_default=true) \ | |
' | |
RUN julia -e 'using Flux, Zygote;' \ | |
&& julia -e 'using InteractiveUtils; versioninfo()' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment