So I just had some time to play around with this. Thanks @fabiangans for your attempt! However, it’s not working properly (and also feels like fighting the package manager :D). I reproduced what you described and observed a couple of issues. Before I get to them, let me add that one should probably
export JULIA_PROJECT=/global/depot/path/environments/globalev as administrator as well, as otherwise a
v1.0 environment will be created by default which conflicts with same-named user environments.
Some of the issues that I observed with aboves setup:
- Everytime the admin adds/updates packages he has to remove the
Generalregistry folder again. (Maybe you didn’t see this because you said “reverse the order” in which case the users registry will likely be used.)
- Packages get shared but not their precompilation. Admin can add packages but musn’t precompile them. Otherwise the users julia will try to use the precompiled *.ji files which fails with permission error.
Even worse, there are inconveniences on the user side:
- If user tries to
gcand doesn’t have all the globally installed packages in his current environment (which is basically always the case) he will see warnings:
(v1.0) pkg> gc Active manifests at: `/home/carsten/.julia/environments/v1.0/Manifest.toml` ┌ Warning: Failed to delete /opt/julia/depot/packages/BenchmarkTools/dtwnm └ @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:370 Deleted /opt/julia/depot/packages/BenchmarkTools/dtwnm: 143.768 KiB ┌ Warning: Failed to delete /opt/julia/depot/packages/JSON/Hs3Dj └ @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:370 Deleted /opt/julia/depot/packages/JSON/Hs3Dj: 79.503 KiB Deleted 2 package installations : 223.271 KiB
And these are just the issues that appeared after 2 minutes of playing around. So this really isn’t a solid setup. Thank you anyway for sharing it with us! It seems to me that the “administrator depot” currently actually isn’t one but is much more “just another depot”.