Collection of Nix recipes for Astronomy & Radio-Astronomy usage
-
Clone this repository
-
Install Nix
2.a. Case 1: You have root access on your machine (preferred method)
2.1. Install Nix in daemon mode with this command:
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon2.2. Apply the project configuration with:
sudo ./scripts/nix-command-edit.sh2.3. Restart the nix daemon:
sudo systemctl restart nix-daemon2.b. Case 2: You do not have root access (e.g., HPC cluster)
2.1. Follow these instructions
-
Open a new terminal or refresh your shell
-
Use it!
Install and run casacore:
# download, (compile), install casacore and get a shell
nix shell -f ./ casacore --command bash
# execute it
readmsInstall and run wsclean:
# download, (compile), install wsclean and get a shell
nix shell -f ./ wsclean --command bash
# execute it
wscleanGet a Python environment with:
- astropy
- radler
- numpy
- scipy
- matplotlib
# download, (compile), install astroPyEnv and get a shell
nix shell -f ./ astroPyEnv --command bash
# execute your command
python -c "import astropy; print('Success!')"# download, (compile), install astroPyEnv and get a shell
nix run -f ./ ds9
# execute your command
python -c "import astropy; print('Success!')"Tested on:
- Linux Desktop/Laptop (Ubuntu; Intel CPU; x86_64; root)
- EPFL Kuma (Red Hat; AMD + GPU Nvidia; x86_64; rootless)
- CSCS Daint (Red Hat; Grace + Hopper GPU; aarch64; rootless)
- EPFL Manticore (Ubuntu; Grace + Hopper GPU; aarch64; rootless)
Astro-Nix allows installation from precompiled binary if you are on the following platforms:
- Linux, x86_64
- Linux, aarch64