Pre-built environments
With this installation method, you will need to select a pre-made
environment from the ska-sdp-spack repository.
Prerequisites
Select that your system matches one of the following:
Environment |
Platform |
Processor Architecture |
|---|---|---|
|
Ubuntu 22.04 |
x86_64_3 |
|
RHEL 9 |
x86_64_3 |
In contrast to the custom installation method (Custom environments) you will only need relatively few prerequisites, specifically Git and Python 3.10 or later:
$ sudo apt-get install -y git python-3
The equivalent for Red Hat:
$ dnf install -y git python3
Installation
Step 1: Install Spack
You can skip this step if you already have Spack installed, but make sure that you have the correct version, or the installation might not work:
$ git clone --depth=2 --branch=releases/v1.1 https://github.com/spack/spack.git
$ . spack/share/spack/setup-env.sh
You will have to repeat . spack/share/spack/setup-env.sh in the
future if you want to run any further Spack commands.
Step 2: Clone ska-sdp-spack, activate environment
Check out the repository, and activate the appropriate environment (see table above):
$ git clone https://gitlab.com/ska-telescope/sdp/ska-sdp-spack.git
$ cd ska-sdp-spack
$ spack env activate env/aws
Step 3: Install software
You can review what software is part of the environment:
$ spack spec
To actually install the software, select the packages you want from the list:
$ spack install wsclean dp3 --only-concrete
This should proceed to download the appropriate packages from the SKA
build cache and install them on your machine. Adding
--only-concrete makes sure that no packages are installed that are
not part of the pre-built environment.
Step 4: Use software
At this point the software is installed into Spack directories. To use the software, load it into the environment as follows:
$ spack load wsclean
$ wsclean
This depends on Spack and the Spack environment being loaded. The following will work directly:
$ spack/bin/spack -e ska-sdp-spack/env/aws load wsclean
$ wsclean
Note that depending on the package you load, this might bring a number of software packages into scope. Especially be mindful that this might override your Python installation with a Spack-provided one!
Maintenance
To update to a newer version of ska-sdp-spack, pull new changes from
Git and re-install changed packages:
$ cd ska-sdp-spack
$ git pull origin
$ spack env activate env/aws
$ spack install [package-list]
You might also want to consider cleaning up temporary files and older installed packages to reclaim disk space:
$ spack clean
$ spack gc