simba/simba:vmpi4py-2024-07-16
Version sha256.e68dee1288cc9dd5c1a8953f2aad69d1dd94849bc44b6390df9bb0ab4b178182
Image size: 4.0 GB
For more on pulling from the registry, see the ilifu documentation.
First, once: add the registry and make it your default
singularity remote add --no-login idia-registry https://sregistry.idia.ac.za
singularity remote use idia-registry
If you added it before, as the ilifu docs describe, remote add says it already exists: just run remote use.
Log in, for a private collection
singularity remote login idia-registry
Paste a token from your token page when asked. Public collections need no login.
Pull the container
singularity pull library://simba/simba:vmpi4py-2024-07-16
Shell into the container
singularity shell library://simba/simba:vmpi4py-2024-07-16
Run the container
singularity run library://simba/simba:vmpi4py-2024-07-16
First, once: add the registry and make it your default
apptainer remote add --no-login idia-registry https://sregistry.idia.ac.za
apptainer remote use idia-registry
If you added it before, as the ilifu docs describe, remote add says it already exists: just run remote use.
Log in, for a private collection
apptainer remote login idia-registry
Paste a token from your token page when asked. Public collections need no login.
Pull the container
apptainer pull library://simba/simba:vmpi4py-2024-07-16
Shell into the container
apptainer shell library://simba/simba:vmpi4py-2024-07-16
Run the container
apptainer run library://simba/simba:vmpi4py-2024-07-16
bootstrap: debootstrap
MirrorURL: http://archive.ubuntu.com/ubuntu/
OSVersion: jammy
%labels
APPLICATION_NAME_BASE Ubuntu LTS + pyloser + martini
OS_VERSION 22.04
SYSTEM_NAME iLifu
SYSTEM_SINGULARITY_VERSION 3.9.1
SYSTEM_URL http://www.ilifu.ac.za
AUTHOR_NAME Jeremy Smith
AUTHOR_EMAIL jeremy@idia.ac.za
%environment
export PATH="$PATH:/opt/pyloser:/opt/analytic"
export SPS_HOME="/opt/python-fsps/src/fsps/libfsps"
export LC_ALL=C.UTF-8
export PYTHONPATH="/opt/analytic:$PYTHONPATH"
%post
##############################################################################
# Setting up Environment
# Create Installation Directories and export paths. This is needed as part of post.
# %environment scriptlet does not define these paths during %post, only after.jhhgjhgiufdgddggfgfjkj
mkdir -p /opt
# Fix command prompt in Singularity 3.5.2
printf 'export PS1="\u@$SINGULARITY_NAME:\w$ "' > /.singularity.d/env/999-psvars.sh
###############################################################################
# Installation of initial packages
apt-get update -y
apt-get install -y software-properties-common
add-apt-repository universe
apt-get update -y
apt-get install -y wget vim apt-utils git bzip2 build-essential mercurial gfortran python3-dev python3-pip gcc libboost-python-dev libgsl-dev python-is-python3
apt-get install -y g++
apt-get install -y cmake
apt-get install -y libopenmpi-dev
# Installation of Anaconda
cd /opt
# Install python packages
python3 -m pip install --upgrade pip
pip install --upgrade numpy scipy astropy cython h5py matplotlib pandas spectral-cube six radio-beam extinction joblib scikit-learn aplpy regions yt h5json scikit-spatial Pylians cppyy
# Install MPI
python3 -m pip install mpi4py
# Install python module open OpenCV
python3 -m pip install opencv-python
# Install Caesar
cd /opt
git clone https://github.com/dnarayanan/caesar.git
cd caesar
python setup.py install
# Install pygadgetreader
cd /opt
git clone https://github.com/dnarayanan/pygadgetreader.git
cd pygadgetreader
#python setup.py build
#python setup.py install
pip install .
# Install pyloser
cd /opt
git clone https://github.com/dfm/python-fsps.git
cd python-fsps
git submodule init
git submodule update
export SPS_HOME=/opt/python-fsps/src/fsps/libfsps
git checkout tags/v0.4.1
python setup.py install
cd /opt
git clone https://bitbucket.org/romeeld/pyloser.git
sed -i '1 i\#!/usr/bin/python' /opt/pyloser/pyloser.py
chmod +x /opt/pyloser/pyloser.py
# Install martini
cd /opt
git clone https://github.com/kyleaoman/martini.git
python3.10 -m pip install martini/[hdf5_output,simbasource]
# install pysynch
cd /opt
git clone https://github.com/mhardcastle/pysynch.git
cd pysynch
python setup.py install
# install analytic (no install script, just required to be on python path)
cd /opt
git clone https://github.com/mhardcastle/analytic.git
# install OpenCV
cd /opt
git clone https://github.com/opencv/opencv.git
cd opencv
mkdir -p build && cd build
cmake ../
make -j4
make install
# Install ipykernel
python -m pip install ipykernel
# Cleanup the container
apt-get clean
apt-get autoclean
Download simba-simba_vmpi4py-2024-07-16.def
#!/bin/sh
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow
export PATH="$PATH:/opt/pyloser:/opt/analytic"
export SPS_HOME="/opt/python-fsps/src/fsps/libfsps"
export LC_ALL=C.UTF-8
export PYTHONPATH="/opt/analytic:$PYTHONPATH"