/
Installing Julia packages

Installing Julia packages

This section provides information on how to install Julia packages.

 

Keep in mind that users do not have sudo permissions on the clusters.

If you need assistance with installing software, please reach out to the support team for your cluster.

Julia version

You can check the available versions of Julia on the clusters


ALICE

On ALICE, you get a list of versions like this

[me@nodelogin02 ]$ module -r avail '^Julia/'

SHARK

Julia is not installed as a module on SHARK. You will have to install it yourself.


Default Julia package installation path

The location where Julia installs packages is controlled by the environment variable $JULIA_DEPOT_PATH.

On ALICE, two default paths are set:

  • The first one is the system path where Julia is installed. However, this cannot be used for installing packages because it is read-only.

  • The second on is a path in your user directory. This one will be used for installing packages, writing logs, etc.

# just an example [me@nodelogin02 ~]$ module load Julia/1.10.0-linux-x86_64 [me@nodelogin02 ~]$ echo $JULIA_DEPOT_PATH /home/me/.julia:/easybuild/software/Julia/1.10.0-linux-x86_64

Custom Julia package installation path

You can change the default Julia package installation path to a location of your choosing. This is useful in particular for working with multiple Julia environments.

To achieve, this you need to overwrite the environment variable $JULIA_DEPOT_PATH before starting Julia, for example like this

export JULIA_DEPOT_PATH=/my/custom/julia/package/path:${JULIA_DEPOT_PATH##*:}

The last part ${JULIA_DEPOT_PATH##*:} has been added so that the system depot path is still referenced.

Note that you will have to make this substitution also in Slurm batch scripts, so that the job picks up the custom Julia package path.

Related content