8000
Skip to content

adevress/astro-nix

Repository files navigation

Astro-Nix

Summary

Collection of Nix recipes for Astronomy & Radio-Astronomy usage

Nix installation

  1. Clone this repository

  2. 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) --daemon

2.2. Apply the project configuration with:

sudo ./scripts/nix-command-edit.sh

2.3. Restart the nix daemon:

sudo systemctl restart nix-daemon

2.b. Case 2: You do not have root access (e.g., HPC cluster)

2.1. Follow these instructions

  1. Open a new terminal or refresh your shell

  2. Use it!

Usage

Example I: casacore

Install and run casacore:

# download, (compile), install casacore and get a shell
nix shell -f ./ casacore --command bash
# execute it
readms

Example II: wsclean

Install and run wsclean:

# download, (compile), install wsclean and get a shell
nix shell -f ./ wsclean --command bash
# execute it
wsclean

Example III: Python environment for radio astronomy

Get 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!')"

Example IV: Use ds9 for image vizualization

# download, (compile), install astroPyEnv and get a shell
nix run -f ./ ds9
# execute your command
python -c "import astropy; print('Success!')"

Tests and support

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)

Binary support

Astro-Nix allows installation from precompiled binary if you are on the following platforms:

  • Linux, x86_64
  • Linux, aarch64

About

Collection of Nix recipes for Astronomy & Radio-Astronomy usage

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

0