Installing packages and Julia outside of home folder? (minimal user space)

Hello!

I am about to work on a HPC with very limited home user space (about 5GB). From experience, I know that my julia projects can quickly add lots of packages, etc into the user’s .julia folder. Is there a documented way to specify to install everything into a “project” folder (this is the way this HPC works apparently).

So for example, having a structure like this:

/path/to/project/.julia
/path/to/project/src
/path/to/project/test
/path/to/project/etc

The .julia folder (package and binary) could be decoupled from /path/to/project/, as long as space is not taken in the home folder.

I have looked at the different threads and I haven’t seen an easy way to do it. This seems like something happening often in the HPC world no?

The JULIA_DEPOT_PATH environment variable can be used to customize a location for what’s normally in .julia.

1 Like

In addition to @GunnarFarneback’s suggestion, a simple symlink could also do the job just fine.

2 Likes

Thanks! So, I could simply install julia with say juliaup, then define the JULIA_DEPOT_PATH=/path/to/project/.julia and the packages should install there when I add packages, create environments, etc?

For symlink, I am less used to use that. How should I implement that? I was under the impression that with symlink, the packages would still be installed in the home folder (?)

Yes. But if you have multiple projects you most likely want to share one depot between them.

The general symlink idea would be to put a pointer from ~/.julia to a different filesystem. Then the files would be addressed like they were in your home folder but in fact they reside somewhere else.

1 Like

Ah, I see, thanks!

It should be only a single project, it is a temporary computing solution. I’ll give a try next week. Thanks again for your answers @GunnarFarneback and @abraemer