Chap II. Singularity on genotoul


image

Introduction

Nextflow pipelines can run with software locally installed but this is not recommended. Most people find either Docker or Singularity the best options.

Singularity is a container platform. It allows you to create and run containers that package up pieces of software in a way that is portable and reproducible. You can build a container using Singularity on your laptop, and then run it on many of the largest HPC clusters in the world, local university or company clusters, a single server, in the cloud, or on a workstation down the hall. Your container is a single file, and you don’t have to worry about how to install all the software you need on each different operating system.

Docker is also a containers system. On HPC such as Genotoul you can use only Singularity containers.

Singularity was created to run complex applications on HPC clusters in a simple, portable, and reproducible way.

Loading singularity module

To search the last version of Singularity available on Genologin/Genotoul :

$ search_module Singularity
system/singularity-2.5.1
system/singularity-3.0.1
system/singularity-3.5.3

$ module load system/singularity-3.5.3

Main use cases

Here is the tldr help with the main use cases.

module load system/Python-3.6.3
tldr singularity
# singularity
- Download a remote image from Sylabs Cloud:
  singularity pull --name image.sif library://godlovedc/funny/lolcow:latest
- Rebuild a remote image using latest Singularity image format:
  singularity build image.sif docker://godlovedc/lolcow
- Start a container from an image and get a shell inside of it:
  singularity shell image.sif
- Start a container from an image and run a command:
  singularity exec image.sif command
- Start a container from an image and execute the internal runscript:
  singularity run image.sif
- Build a singularity image from a recipe file:
 sudo singularity build image.sif recipe

Exercise 6 : Use singularity and understand bind directory.

  • Execute tldr singularity to explore all functions available with singularity.
  • Download a remote image with : singularity build rnaseq.sif docker://nextflow/rnatoy:peerj5515 This image contain software such as bowtie2 or gffread
  • Start a container from this image and get a shell inside of it: singularity shell rnaseq.sif
  • Try to execute the command : bowtie2, does it works ?
  • Do you have access to /bank/ ?
  • Get out of the image, with Ctrl+D
  • Do you have access to /bank/ ?
  • Start the container with the option -B bank: singularity shell -B /bank rnaseq.sif
  • Do you have access to /bank/ ?

results matching ""

    No results matching ""