Difference between revisions of "Singularity 2016"

From HPC users
Jump to navigationJump to search
Line 1: Line 1:
== Introduction ==
== Introduction ==
Singularity is a portable application stack packaging and runtime utility. With Singularity, you can provide whole working environments and install the OS and Software you neet to use within a container.  In the best case, "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."[¹ http://singularity.lbl.gov/]
Singularity is a portable application stack packaging and runtime utility. With Singularity, you can provide whole working environments and install the OS, and Software you need to use within a container.  In the best case, "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."[¹ http://singularity.lbl.gov/]


== Installed version ==
== Installed version ==
Line 9: Line 9:
== Using Singularity ==
== Using Singularity ==


Singularity can be a very powerful tool to create containers with your favoured OS environment and all the tools that you need - completely without the help or permission of the HPC administrators. But in order to use Singularity, you need to create your own containers on your own local device since you need root permissions to do so which is not possible on our cluster. in the following steps we will show you exemplarily how to create your own containers, fill them with the software you need and how you use them to do your work.
Singularity can be a very powerful tool to create containers with your favoured OS environment, and all the tools you need - completely without the help or permission of the HPC administrators. In order to use Singularity, you need to create your own containers on a local device since you need root permissions to do so which we can't  grant our users on our cluster. In the following steps we will show you exemplarily how to create your own containers, fill them with the software you need, and how to use them to start calculating.


=== Installation ===
=== Installation ===
In our example, we use CentOS 7. With other distributions, the procedure should be similar but some steps might slightly differ, especially the needed dependencies for the installation.
In our example, we use CentOS 7. On other distributions, the procedure should be similar, but some steps might slightly differ, especially the needed dependencies for the installation.


To install Singularity on your system, you need to install one dependency, clone the GitHub repository and perform confingure/make/make install.
To install Singularity on your system, you need to install one dependency, clone the GitHub repository and perform confingure/make/make install.
Line 29: Line 29:
Now, singularity should be installed on your system. Just to be sure, check the version of the newly installed software:
Now, singularity should be installed on your system. Just to be sure, check the version of the newly installed software:
  singularity --version
  singularity --version
Singularity should display the installed version.
Singularity should display the installed version. <br\>
should this be the case, you can remove the folder containing the source files we originally needed for the installation.
 
=== Creating Containers ===
There are three ways to create containers:
* A) Downloading solely OS containers and manually adding software packets
* B) Creating installaton Scripts, including OS and post-install commands
* C) Searching for already 'ready to go scripts' from Singularitys repository
 
Below we will briefly cover each of the methods mentioned.
 
==== A) Download and modify
 




Line 39: Line 51:
  module spider Singularity
  module spider Singularity


This will show you basic informations e.g. a short description and the currently installed version.
This will show you basic informations e.g. a short description, and the currently installed version.


To load the desired version of the module, use the command, e.g.
To load the desired version of the module, use the command, e.g.
Line 48: Line 60:
Always remember: this command is case sensitive!
Always remember: this command is case sensitive!


To get familiar with the commands and options available for Singularity, you can use the help function:
To get familiar with the commands, and options available for Singularity, you can use the help function:
  singularity --help
  singularity --help


== Documentation ==
== Documentation ==


The developers offer a detailed [https://singularity.lbl.gov/ website] with further information and a [https://singularity.lbl.gov/quickstart Quick Stard Guide].
The developers offer a detailed [https://singularity.lbl.gov/ website] with further information, and a [https://singularity.lbl.gov/quickstart Quick Stard Guide].

Revision as of 10:08, 28 February 2019

Introduction

Singularity is a portable application stack packaging and runtime utility. With Singularity, you can provide whole working environments and install the OS, and Software you need to use within a container. In the best case, "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."[¹ http://singularity.lbl.gov/]

Installed version

The currently installed version is available on environment hpc-env/6.4

Singularity/2.4.2-GCCcore-6.4.0

Using Singularity

Singularity can be a very powerful tool to create containers with your favoured OS environment, and all the tools you need - completely without the help or permission of the HPC administrators. In order to use Singularity, you need to create your own containers on a local device since you need root permissions to do so which we can't grant our users on our cluster. In the following steps we will show you exemplarily how to create your own containers, fill them with the software you need, and how to use them to start calculating.

Installation

In our example, we use CentOS 7. On other distributions, the procedure should be similar, but some steps might slightly differ, especially the needed dependencies for the installation.

To install Singularity on your system, you need to install one dependency, clone the GitHub repository and perform confingure/make/make install. To make this as simple as possible, open a terminal, and copy-paste this lines:

cd ~ && mkdir singularity_install && cd singularity_install
sudo yum install libarchive-devel -y
git clone https://github.com/singularityware/singularity.git
cd singularity
git fetch --all
git checkout 2.6.1
./autogen.sh
./configure --prefix=/usr/local
make
sudo make install

Now, singularity should be installed on your system. Just to be sure, check the version of the newly installed software:

singularity --version

Singularity should display the installed version. <br\> should this be the case, you can remove the folder containing the source files we originally needed for the installation.

Creating Containers

There are three ways to create containers:

  • A) Downloading solely OS containers and manually adding software packets
  • B) Creating installaton Scripts, including OS and post-install commands
  • C) Searching for already 'ready to go scripts' from Singularitys repository

Below we will briefly cover each of the methods mentioned.

==== A) Download and modify


#######WORK IN PROGRESS#######


If you want to find out more about Singularity on the HPC Cluster, you can use the command

module spider Singularity

This will show you basic informations e.g. a short description, and the currently installed version.

To load the desired version of the module, use the command, e.g.

module load hpc-env/6.4
module load Singularity

Always remember: this command is case sensitive!

To get familiar with the commands, and options available for Singularity, you can use the help function:

singularity --help

Documentation

The developers offer a detailed website with further information, and a Quick Stard Guide.