Skip to content

Testing Singularity container and Singularity-hub

Notifications You must be signed in to change notification settings

kma/singularity-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Singularity use case

Create a reproducible container image to run a simple python program (data_alaysys.py).

This code takes a csv file and plots results in two separated pdf files.

The csv can be found [here]

Create a container locally

Run build-local to create and bootstrap a container (This action needs root access).

$ sudo singularity create -s 1000 mycontainer.img
$ sudo singularity bootstrap mycontainer.img Singularity

Run python code inside the container

Run run-local.sh to execute python code inside the container.

$ wget http://info.iut-bm.univ-fcomte.fr/staff/mazouzi/docs/ganglia-metrics.csv

$ ./mycontainer.img data_analysis

Pull image container from singularity-hub

If you don't root access, singularity-hub can create images by providing a specification file. See the [documentation] for more details .

The image corresponding to the Singularity file can be pulled from https://singularity-hub.org/containers/842/.

Pull image:

$ singularity pull shub://842
Or
$ singularity pull shub://kma/singularity-lab:master

Run python code using:

$ singularity exec kma-singularity-lab-master.img python data_analysis.py

Or

$ ./kma-singularity-lab-master.img data_analysis.py

About

Testing Singularity container and Singularity-hub

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published