Image size: 700.2 MB

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://pipeline-software/rsslsspectra:2024-10-16

Shell into the container

singularity shell library://pipeline-software/rsslsspectra:2024-10-16

Run the container

singularity run library://pipeline-software/rsslsspectra:2024-10-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://pipeline-software/rsslsspectra:2024-10-16

Shell into the container

apptainer shell library://pipeline-software/rsslsspectra:2024-10-16

Run the container

apptainer run library://pipeline-software/rsslsspectra:2024-10-16
The container holds the RSSspetra software which can be run via the commands below.
Singularity shell rssspectra.sif, cd /opt/rsslsspectra, and python main.py or Just run 
singularity run rsslsspectra.sif
BootStrap: docker
From: python:3.6

%labels
        APPLICATION_NAME Ubuntu LTS + RSSspectra
        APPLICATION_URL https://cloudcape.saao.ac.za/index.php/s/8P2pX2X2OAO0LQz

        SYSTEM_NAME iLifu
        SYSTEM_SINGULARITY_VERSION 4.1.3
        SYSTEM_URL http://www.ilifu.ac.za

        AUTHOR_NAME IDIA
        AUTHOR_EMAIL support@ilifu.ac.za
%help
    The container holds the RSSspetra software which can be run via the commands below.
    Singularity shell rssspectra.sif, cd /opt/rsslsspectra, and python main.py or Just run 
    singularity run rsslsspectra.sif
%post

    # Set work directory
    mkdir -p /opt/rsslsspectra
    cd /opt/rsslsspectra

    # Install dependencies from apt-get
    apt-get update && \
    apt-get install -y \
        libgl1-mesa-glx \
        python3-pyqt5 \
        xdotool \
        apparmor \
        evince && \
    ln -s /etc/apparmor.d/usr.bin.evince /etc/apparmor.d/disable/usr.bin.evince && \
    apt-get update && apt-get install -y bash
    apt-get clean

    #Numpy needed before requirements.txt
    pip install numpy

    # Install pip requirements
    pip install --no-cache-dir -r /opt/rsslsspectra/requirements.txt

    # Add DS9 executable
    mv /opt/rsslsspectra/ds9 /usr/bin/ds9
    chmod +rx /usr/bin/ds9
    
    # Set environment variables
    export LIBGL_ALWAYS_INDIRECT=1
    export NO_AT_BRIDGE=1
    export PATH="$PATH:/opt/rsslsspectra/"
    
%files
    .xdg /opt/rsslsspectra/.xdg
    ds9 /opt/rsslsspectra/ds9
    requirements.txt /opt/rsslsspectra/
    ui /opt/rsslsspectra/ui
    configs /opt/rsslsspectra/configs
    stds /opt/rsslsspectra/stds
    docs /opt/rsslsspectra/docs
    main.py /opt/rsslsspectra/

%environment
    export LIBGL_ALWAYS_INDIRECT=1
    export NO_AT_BRIDGE=1
    export PATH="$PATH:/opt/rsslsspectra/"
    export XDG_RUNTIME_DIR=$HOME/.xdg/runtime

%runscript
    echo "Running main.py..."
    cd /opt/rsslsspectra
    exec python main.py 
Download pipeline-software-rsslsspectra_2024-10-16.def
#!/bin/sh

    echo "Running main.py..."
    cd /opt/rsslsspectra
    exec python main.py 
# /.singularity.d/env/10-docker2singularity.sh
#!/bin/sh
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export LANG="${LANG:-"C.UTF-8"}"
export GPG_KEY="${GPG_KEY:-"0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D"}"
export PYTHON_VERSION="${PYTHON_VERSION:-"3.6.15"}"
export PYTHON_PIP_VERSION="${PYTHON_PIP_VERSION:-"21.2.4"}"
export PYTHON_SETUPTOOLS_VERSION="${PYTHON_SETUPTOOLS_VERSION:-"57.5.0"}"
export PYTHON_GET_PIP_URL="${PYTHON_GET_PIP_URL:-"https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py"}"
export PYTHON_GET_PIP_SHA256="${PYTHON_GET_PIP_SHA256:-"c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309"}"
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow


    export LIBGL_ALWAYS_INDIRECT=1
    export NO_AT_BRIDGE=1
    export PATH="$PATH:/opt/rsslsspectra/"
    export XDG_RUNTIME_DIR=$HOME/.xdg/runtime