I’d like to cache the julia package compilation in an external volume which can be read and written to by multiple clients (using a respective kubernetes volume) .
My question is whether it is enough to bring the .julia/compile folder to this special volume, or whether something else, e.g. if the lockfile resides somewhere else, needs to be brought there too.
Thanks to the following two julia additions I hope this works in principle since 1.10
I tried this now but experience recompilation despite the compiled directory being reconstructed. I guess another directory is needed somehow for caching compilation to work…
Does someone know which other package is needed? Or how to debug?
It seems that it is due to mtime changes inside .julia/packages looking into the code it seems that in principle julia has different ways of caching
the mtime way is only one, the other being hash based, which would be better here for central caching.
Does someone know what needs to be set/available for precompilation to use hash for identification?
EDIT: I think I understood that just some packages specify explicitly to use mtime instead of hash by specifying include_dependency("myexternal.file", track_content=false). Hence it is indeed necessary to also backup the packages subdirectory for caching to work.
I know tried to symlink the compiled folder, which works, and also the packages folder to a cache directory, which unfortunately kind of does not work.
It makes julia being super super super slow, like almost not responsive. Not sure what is going on…
EDIT: I think it is not because of the symlink but because of some characteristics of my remote filesystem which is not fully posix compliant or maybe slow for some things.