How to set reuse Julia session from terminal process?

I’ve py frontend that calls something like julia -e "runmyapp()" which exits upon completion. Is there way to reuse such sessions? My julia program takes minutes to compile which gets repeated. Thanks!

1 Like

You can try: GitHub - dmolina/DaemonMode.jl: Client-Daemon workflow to run faster scripts in Julia

Or make your script a package and have it precompiled.

Alternatively, use JuliaCall, to interface with Julia without running it externally.

3 Likes

Thanks we used PackagePrecompiler b4 but it’s a little buggy. DaemonMode looks interesting but criu seems even simpler. Related question, is there a way to keep alive julia -e "f(args1)"? I want to reuse that process to execute f(args2) because it already compiled f.

I guess DaemonMode kinda answers my question. will try using criu on DaemonMode

2 Likes