I remember trying that @davibarreira , but it didn’t make much difference. Let me know if you can come up with a working example. That would be great.
Ok. I got it working. It’s significantly faster. Run the following in the REPL:
using PackageCompiler
using Pkg
Pkg.activate(".")
using Flux
using GLMakie
using Makie
using CairoMakie
using DataFrames
PackageCompiler.create_sysimage(["MLJ","Flux", "CairoMakie", "GLMakie", "Makie", "DataFrames"]; sysimage_path="ds.so", precompile_execution_file="precompile.jl")
where the precompile.jl
is a script with
using Makie
using GLMakie
using CairoMakie
CairoMakie.activate!()
p = plot(rand(10));
Then, do julia --sysimage "ds.so"
to run the repl with the precompiled image.
3 Likes
If you want to use it on Jupyter, just do:
using IJulia
IJulia.installkernel(“Julia DS”, “--sysimage=/home/username/<SysImageFolderLocation>/ds.so”)
3 Likes
It would be interesting to turn this into a Github Action that could automate the generation of readily available binary system images.
5 Likes
Yeah. Whenever I alter my julia version, I endup having to do it all over again.