Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Singularity/Apptainer definition file and README #12

Merged
merged 2 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions containers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Apptainer/Singularity

Apptainer (former name: Singularity) is a program to build virtual machines (containers) with desired OS and programs. These can be easily deployed and ran on other computers.
Containers are build based on the recipies called "definition files", here we provide a definition file `Singularity`. Note, sometimes definition files have an extension `.def`, which we also refer to in the instructions below.

The current definition file contains `tempo2`, `enterprise`, and other primary packages for IPTA DR3 data analyses.

## To build a container:

`sudo apptainer build new_sif_file_name.sif def_file.def`

## To browse container content:

`apptainer shell --bind "/virtual_home_directory/:$HOME" pulsarenv_official_20240220.sif`

Where `/virtual_home_directory/` is a path on your local machine

## For building containers inside Windows WSL Ubuntu (Ubuntu for Windows)

In Windows Store, there is Ubuntu app that allows to run Ubuntu shell in Windows. However, by default, it is based on WSL1. Make sure to upgrade from WSL1 to WSL2. This requires also updating settings in BIOS.

To be able to use graphical interface (PGPLOT) in tempo2 plk plugin, a proper display redirection is required:

1. In .bashrc in Ubuntu, `export DISPLAY=172.26.32.1:0.0`, where the IP address (v4) can be obtained in Windows command line prompt by running `ipconfig`.
2. Install Xming for Windows.
3. Run Xming with `-ac` argument via XLaunch. Then open Ubuntu.
11 changes: 10 additions & 1 deletion containers/Singularity
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ From: ubuntu:22.04
apt-get -y --no-install-recommends install libgeos++-dev libgeos3.10.2 libgeos-c1v5 libgeos-dev libgeos-doc
apt-get -y --no-install-recommends install python3.10-dev libhdf5-dev libsuitesparse-dev cargo rustc proj-bin

apt-get install -y openmpi-bin libopenmpi-dev # OpenMPI for PolyChord sampler

update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1000
update-alternatives --set python /usr/bin/python3.10

Expand Down Expand Up @@ -94,6 +96,12 @@ From: ubuntu:22.04
python3.10 -m pip install -U emcee chainconsumer
python3.10 -m pip install -U pdflatex

python3.10 -m pip install ipdb
python3.10 -m pip install tqdm
python3.10 -m pip install scikit-learn
python3.10 -m pip install bilby
python3.10 -m pip install mpi4py # for MPI support in PyPolyChord

#tempo2
rm -rf /tmp/tempo2
rm -rf /var/tmp/tempo2
Expand All @@ -120,7 +128,8 @@ From: ubuntu:22.04
python3.10 -m pip install git+https://github.com/nanograv/pint_pal@main
python3.10 -m pip install git+https://github.com/nanograv/enterprise@dev
python3.10 -m pip install git+https://github.com/nanograv/enterprise_extensions@dcbusyweek

python3.10 -m pip install git+https://github.com/bvgoncharov/enterprise_warp

apt-get clean
apt-get -y autoremove

Expand Down
Loading