Skip to content

Instantly share code, notes, and snippets.

@ImreSamu
Created August 2, 2020 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ImreSamu/235daa6426076d5167a0774ea96c0cb0 to your computer and use it in GitHub Desktop.
Save ImreSamu/235daa6426076d5167a0774ea96c0cb0 to your computer and use it in GitHub Desktop.
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