barbagroup/geoclaw-landspill:v1.0.dev1

$ singularity pull shub://barbagroup/geoclaw-landspill:v1.0.dev1

Singularity Recipe

# multi-stage build: builder
# ==========================
Bootstrap: docker
From: ubuntu:focal
Stage: builder

%environment
    export MPLBACKEND=agg

%post
    # prepare environment
    ln -snf /usr/share/zoneinfo/UTC /etc/localtime
    echo UTC > /etc/timezone
    apt update && apt -y full-upgrade
    apt install -y --no-install-recommends git ca-certificates gfortran python3 python3-pip

    # requires users to provide variable ${VER}
    git clone --branch v1.0.dev1 --recurse-submodules https://github.com/barbagroup/geoclaw-landspill.git

    # install dependencies
    cd /geoclaw-landspill && pip3 install -r requirements-build.txt

    # build binary wheel
    cd /geoclaw-landspill && python3 setup.py bdist_wheel --build-type RELEASE


# multi-stage build: production
# =============================
Bootstrap: docker
From: ubuntu:focal
Stage: production

%labels
    Author Pi-Yueh Chuang (pychuang@gwu.edu)
    Version v1.0.dev1

# copy data from builder
%files from builder
    /geoclaw-landspill/dist /root/dist
    /geoclaw-landspill/cases /root/cases

%post
    # move example to a proper location
    mv /root/cases /opt/geoclaw-landspill-cases 

    # create runtime environment
    ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone
    apt update && apt -y full-upgrade
    apt install -y --no-install-recommends libgfortran5 libgomp1 python3 python3-pip
    rm -rf /var/lib/apt/lists/*

    # install geoclaw-landspill
    echo $(find /root -name "*.whl")
    pip3 install $(find /root -name "*.whl") && rm -rf /root/*

%runscript
    exec geoclaw-landspill $@

%help

    This help only covers the usage of this Singularity image. For the usage of
    geoclaw-landspill package, see https://github.com/barbagroup/geoclaw-landspill

    A Singularity image can be treated as an executable, which is equivalent to
    the executable `geoclaw-landspill` from geoclaw-landspill package. Assuming
    this Singularity image is called "landspill.sif", for example:

        * To run a simulation: `$ landspill.sif run <path to case>`
        * To create a NetCDF file: `$ landspill.sif createnc <path to case>`
        * To create quick depth plots: `$ landspill.sif plotdepth <path to case>`

    Alternatively, users can run these subcommands with, for example,

        * To run a simulation: `$ singularity run landspill.sif run <path to case>`
        * To create a NetCDF file: `$ singularity run landspill.sif createnc <path to case>`
        * To create quick depth plots: `$ singularity run landspill.sif plotdepth <path to case>`

Collection


View on Datalad

Metrics

key value
id /containers/barbagroup-geoclaw-landspill-v1.0.dev1
collection name barbagroup/geoclaw-landspill
branch master
tag v1.0.dev1
commit 032e86793becc959bbc65227a6d73cf89e250f86
version (container hash) d8ca5c73187d2ebe698eb059e26205fe51a48488008749e5359198bd7e68dbd0
build date 2021-01-08T09:44:55.499Z
size (MB) 151.5625
size (bytes) 158924800
SIF Download URL (please use pull with shub://)
Datalad URL View on Datalad
Singularity Recipe Singularity Recipe on Datalad
We cannot guarantee that all containers will still exist on GitHub.