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")
precompile.jl is a script with
using Makie using GLMakie using CairoMakie CairoMakie.activate!() p = plot(rand(10));
julia --sysimage "ds.so" to run the repl with the precompiled image.
If you want to use it on Jupyter, just do:
using IJulia IJulia.installkernel(“Julia DS”, “--sysimage=/home/username/<SysImageFolderLocation>/ds.so”)
It would be interesting to turn this into a Github Action that could automate the generation of readily available binary system images.
Yeah. Whenever I alter my julia version, I endup having to do it all over again.