Difference between revisions of "Biocluster Singularity"

From Carl R. Woese Institute for Genomic Biology - University of Illinois Urbana-Champaign
Jump to navigation Jump to search
(Running Containers)
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
__TOC__
 
__TOC__
 +
== About ==
 +
* Containers contain applications in a way that keep them isolated from the host system that they run on.  Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.
 +
* Singularity is a program that can launch containers securely in a HPC environment.  Other similar programs are Docker, LXD, and Kubernetes.
 +
 
== Module ==
 
== Module ==
 
*Load Singularity Module to run any singularity commands
 
*Load Singularity Module to run any singularity commands
Line 25: Line 29:
 
singularity exec r-base_latest.sif R
 
singularity exec r-base_latest.sif R
 
</pre>
 
</pre>
 +
 +
== Storage ==
 +
* Your home folder is automatically mounted
 
* You should have access to any group folders in /home/groups, /home/labs, and /private_stores
 
* You should have access to any group folders in /home/groups, /home/labs, and /private_stores
 
* The local /scratch space is accessible.
 
* The local /scratch space is accessible.
  
== Mounting Storage ==
+
== References ==
* By default singularity will only have your home folder mounted.
+
* [https://singularity.lbl.gov/ https://singularity.lbl.gov/]
* To mount /home/group, /home/lab, or /private_stores folder, please use the -B parameter to bind the folder into singularity
 
* The format is -B source_dir:container_dir where source_dir is the location on the compute node and container_dir is the directory in the container you want the folder to bind to. We recommend to always keep them the same.
 
<pre>
 
singularity exec -B /private_stores/mirrors:/private_stores/mirrors r-base_latest.sif R
 

Revision as of 11:22, 3 February 2020

About[edit]

  • Containers contain applications in a way that keep them isolated from the host system that they run on. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.
  • Singularity is a program that can launch containers securely in a HPC environment. Other similar programs are Docker, LXD, and Kubernetes.

Module[edit]

  • Load Singularity Module to run any singularity commands
module load singularity/3.4.1

Creating Containers[edit]

  • This can not be done on the Biocluster. It has to be done on your local machine. This is a security risk to allow users to create or edit containers on a HPC resource

Download Containers[edit]

  • You need to use the biologin nodes (biologin-0 and biologin-1) to download containers
  • This will not work from the compute nodes as they do not have access to the internet
  • Download a pre-existing container from Singularity Hub - https://singularity-hub.org/. singularity-r is an example R container
singularity pull --name singularity-r.simg shub://nickjer/singularity-r
singularity pull docker://r-base

Running Containers[edit]

  • Do not use the biologin nodes (biologin-0 and biologin-1) to run containers. The login nodes are only allowed to be used to download containers
  • From a compute node or a SLURM job script, run the following. r-base_latest.sif is name of the container. R is the program to run in the container. This can be bash to get a command line.
singularity exec r-base_latest.sif R

Storage[edit]

  • Your home folder is automatically mounted
  • You should have access to any group folders in /home/groups, /home/labs, and /private_stores
  • The local /scratch space is accessible.

References[edit]