Image size: 2.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://ubuntu/jammy-compile:0.3

Shell into the container

singularity shell library://ubuntu/jammy-compile:0.3

Run the container

singularity run library://ubuntu/jammy-compile:0.3

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://ubuntu/jammy-compile:0.3

Shell into the container

apptainer shell library://ubuntu/jammy-compile:0.3

Run the container

apptainer run library://ubuntu/jammy-compile:0.3
Base Ubuntu jammy image, library://ci-bot/ubuntu/jammy:0.3, to use as a basis for more specific containers.
Bootstrap: library
Library: https://sregistry.idia.ac.za
From: ci-bot/ubuntu/jammy:0.3

%labels
  Maintainer Dane Kennedy
  Version 0.3

%help
  Ubuntu jammy with compilers and build libraries, library://ci-bot/ubuntu/jammy-compile:0.3, to use as a basis for containers that compile from source.

%environment
  export INSTALLER_PATH=/installer
  export SOFTWARE_PATH=/software
  export PATH=${SOFTWARE_PATH}/bin:${PATH}
  export LD_LIBRARY_PATH=${SOFTWARE_PATH}/lib:${LD_LIBRARY_PATH}
  export LIBRARY_PATH=${SOFTWARE_PATH}/lib:${LIBRARY_PATH}
  export CPATH=${SOFTWARE_PATH}/include:${CPATH}
  export INCLUDE=${SOFTWARE_PATH}/include/:${INCLUDE}
  export PKG_CONFIG_PATH=${SOFTWARE_PATH}/lib/pkgconfig:${PKG_CONFIG_PATH}

  export LC_ALL=C
  unset XDG_RUNTIME_DIR

%post
  # Create Installation Directories and export paths. This is needed as part of post.
  # %environment scriptlet does not define these paths during %post, only after.
  mkdir -p /software /installer
  export INSTALLER_PATH=/installer
  export SOFTWARE_PATH=/software
  PATH=${SOFTWARE_PATH}/bin:${PATH}
  LD_LIBRARY_PATH=${SOFTWARE_PATH}/lib:${LD_LIBRARY_PATH}
  LIBRARY_PATH=${SOFTWARE_PATH}/lib:${LIBRARY_PATH}
  CPATH=${SOFTWARE_PATH}/include:${CPATH}
  INCLUDE=${SOFTWARE_PATH}/include/:${INCLUDE}
  PKG_CONFIG_PATH=${SOFTWARE_PATH}/lib/pkgconfig:${PKG_CONFIG_PATH}
  export DEBIAN_FRONTEND=noninteractive

  # Update apt
  apt-get update -y && apt-get upgrade -y && apt-get dist-upgrade -y

  # Install common stuff
  apt-get install -y \
    apt-utils \
    autoconf \
    automake \
    bc \
    bison \
    build-essential \
    bzip2 libbz2-1.0 libbz2-dev \
    ca-certificates \
    cmake \
    default-jdk \
    dirmngr \
    flex \
    gdebi-core \
    gfortran \
    git \
    hdf5-tools libhdf5-dev \
    hwloc libhwloc-dev \
    imagemagick \
    libboost-all-dev \
    libcairo2-dev \
    libcurl4-openssl-dev \
    libevent-dev \
    libhdf5-dev \
    libmagic1 libmagic-dev \
    libncurses5 libncurses5-dev \
    libnetcdf-dev \
    libnuma1 libnuma-dev \
    libreadline-dev \
    libssl3 libssl-dev \
    libtool \
    libxml2 libxml2-dev \
    libxslt1.1 libxslt1-dev \
    libxt-dev \
    netcdf-bin \
    pandoc \
     pandoc-citeproc \
    patchelf \
    pkg-config \
    python3 python3-dev \
    sqlite3 libsqlite3-0 libsqlite3-dev \
    systemd \
    texlive \
    texlive-extra-utils \
    texlive-fonts-extra \
    texlive-latex-extra \
    texlive-pictures \
    texlive-pstricks \
    texlive-publishers \
    texlive-science \
    texlive-xetex \
    wget \

  ldconfig

  # Create /users to bind home directories into the container.
  mkdir -p \
    /carta_share \
    /cbio \
    /cchem \
    /data \
    /idia \
    /ilifu \
    /scratch3 \
    /software \
    /users \

  # Cleanup the container
  apt-get clean
  apt-get autoclean
  rm -rf "${INSTALLER_PATH:?}"/*

%test
  grep "22.04" /etc/issue
Download ubuntu-jammy-compile_0.3.def
#!/bin/sh
#!/bin/sh

  grep "22.04" /etc/issue
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow


  export INSTALLER_PATH=/installer
  export SOFTWARE_PATH=/software
  export PATH=${SOFTWARE_PATH}/bin:${PATH}
  export LC_ALL=C
  unset XDG_RUNTIME_DIR



  export INSTALLER_PATH=/installer
  export SOFTWARE_PATH=/software
  export PATH=${SOFTWARE_PATH}/bin:${PATH}
  export LD_LIBRARY_PATH=${SOFTWARE_PATH}/lib:${LD_LIBRARY_PATH}
  export LIBRARY_PATH=${SOFTWARE_PATH}/lib:${LIBRARY_PATH}
  export CPATH=${SOFTWARE_PATH}/include:${CPATH}
  export INCLUDE=${SOFTWARE_PATH}/include/:${INCLUDE}
  export PKG_CONFIG_PATH=${SOFTWARE_PATH}/lib/pkgconfig:${PKG_CONFIG_PATH}

  export LC_ALL=C
  unset XDG_RUNTIME_DIR