DiamondLightSource/Opt-ID:env-v2

$ singularity pull shub://DiamondLightSource/Opt-ID:env-v2

Singularity Recipe

Bootstrap: docker
From: ubuntu:20.04
Stage: build

%post
    # Log when this container was built into a .sif file
    CONTAINER_BUILD_DATE=`date`
    echo "export CONTAINER_BUILD_DATE=\"${CONTAINER_BUILD_DATE}\"" >> $SINGULARITY_ENVIRONMENT

    # Update apt-get so we can install python3-pip
    apt update -q
    apt install -y -q software-properties-common
    add-apt-repository universe > /dev/null 2>&1

    # Install build dependencies
    apt update -q
    apt install -y -q build-essential python3-pip libopenmpi-dev openmpi-bin texlive texlive-xetex texlive-fonts-recommended texlive-latex-recommended pandoc

    # Install majority of needed python packages
    pip3 install --no-cache-dir mock pytest numpy h5py mpi4py scipy ruamel.yaml Jinja2 matplotlib pandoc jupyter jupyter_client nbformat nbconvert
    find /usr/lib/python3.*/ -name 'tests' -exec rm -r '{}' +

    # Clean unused packages to make the image smaller
    apt autoremove -y --purge
    apt clean -y
    rm -rf /var/lib/apt/lists/*

%test
    echo "Container was build on ${CONTAINER_BUILD_DATE}"

    # Test that python 3+ and pip3 are installed correctly
    python3 --version && echo "PYTHON3 FOUND" || echo "PYTHON3 NOT FOUND"
    pip3 --version    && echo "PIP3    FOUND" || echo "PIP3    NOT FOUND"

%labels
    Owner   Rosalind Franklin Institute
    Author  joss.whittle@rfi.ac.uk
    Version v2.0

%help
    Provides a base environment for provisioning an ubuntu 20.04 image with pip3.

Collection


View on Datalad

Metrics

key value
id /containers/DiamondLightSource-Opt-ID-env-v2
collection name DiamondLightSource/Opt-ID
branch master
tag env-v2
commit e6ac589e2a530da84797c1cf16936d6af313a746
version (container hash) bf46aae0b7cd5259530c221a31c801e2cd74a625741f30cd22006ebf01643660
build date 2021-01-15T10:59:50.108Z
size (MB) 536.59765625
size (bytes) 562663424
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.