Share application on cluster: read-only access to JULIA_DEPOT_PATH?

To share a Julia CLI application with other users of the same cluster, is it OK if I ask them to invoke my Julia application from my bash script which sets JULIA_DEPOT_PATH to my own ~/.julia directory (using the absolute path, of course)? In particular, if other users have no write access to this directory, would it be OK as long they’re not installing new packages (which is always the case since they only use Julia via my application)?

Depots can be stacked: Environment Variables · The Julia Language. The first one must be writable, but the others can be read-only.

What if the users never need to run Pkg? Do they still need writable permission?

Yes, Pkg operations need to be able to write something, but those operations will happen on the first, writable depot. That’s why I’m suggesting that the depot you want to share should not be the first one of the stack.

I appreciate that your suggestion will enable users to access pre-installed packages as well as installing their own packages. However, in a more restricted setting, if all packages are already downloaded and do not need to be updated, does Pkg still need to write into the depot path?

P.S. I think I’ll just find out on my laptop by doing an experiment and setting the depot path to a directory that’s writable by no user including myself.

I believe there are many assumptions in Julia internals that the first depot should be writable. Some things may work, but you’re going to break something else at some point.