You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Singularity

Background

Singularity is a container solution created by necessity for scientific and application driven workloads. The Singularity containers can be used to package entire scientific workflows, software and libraries, and even data. This means that you don’t have to ask your cluster admin to install anything for you - you can put it in a Singularity container and run.

(see webpage https://www.sylabs.io and/or http://singularity.lbl.gov/ for details)

Build a Singularity Container

Build a container from a Singularity recipe (ubuntu1604-cuda92-ompi400.def)

wget https://wiki.ncsa.illinois.edu/download/attachments/82518873/ubuntu1604-cuda92-ompi400.def
singularity build ubuntu1604-cuda92-ompi400.simg ubuntu1604-cuda92-ompi400.def

Pull a container from Singularity Hub or Docker Hub

singularity pull docker://nvidia/cuda-ppc64le:9.2-cudnn7-devel-ubuntu16.04

Build a "--writable" and/or "--sandbox" container image

If users wanted to create a writable ext3 image, user could do so with the "--writable" option. You must create writable containers as root.

singularity build --writable cuda-ppc64le.simg docker://nvidia/cuda-ppc64le:9.2-cudnn7-devel-ubuntu16.04

If you wanted to create a container within a writable directory (called a sandbox) you could do so with the "--sandbox" option. It’s possible to create a sandbox without root privileges, but to ensure proper file permissions it is recommended to do so as root.

singularity build --sandbox cuda-ppc64le/ docker://nvidia/cuda-ppc64le:9.2-cudnn7-devel-ubuntu16.0
sudo singularity shell --writable cuda-ppc64le/

Run a Singularity Container

Run a container with "exec" command

mpirun -n 4 singularity exec --nv /opt/apps/samples-image/ubuntu1604-cuda92-ompi400.simg hostname

Run a container with shell

singularity shell --nv /opt/apps/samples-image/ubuntu1604-cuda92-ompi400.simg

Frequently Asked Questions

Can I run a Singularity container with x86 architecture image on an IBM ppc64le system?

Answer: Singularity can not directly run x86 binaries on a IBM Power system because the bytes of machine code are different. Users need to make sure their own images are built for "ppc64le" rather than "x86".


  • No labels