Differences between revisions 1 and 2
Revision 1 as of 2017-05-22 17:17:19
Size: 713
Comment:
Revision 2 as of 2017-05-22 19:50:27
Size: 4113
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Singularity allows instantiating an alternative operating system environment on Linux systems. <<TableOfContents>>

== Overview ==

Singularity allows instantiating an '''alternative operating system environment on Linux systems'''.
Line 6: Line 10:
 * If you still have software for the discontinued SL5 around and need to run, build, develop or debug it, Singularity makes that possible.
And all this without significant overhead.
 * If you still have software for the discontinued SL5 around and need to run, build, develop or debug it on a supported system, Singularity makes that possible.
And all this without significant overhead. '''Sounds like fiction? It's fact. Right now.''' Some caveats do apply though.

Credit: Singularity was and is being developed at Berkeley Lab. Please see http://singularity.lbl.gov for upstream information.

== Invocation ==

There are several ways to instantiate a Singularity container and run software in it. The two most important ones are:

 * '''"Execute" an image''' <<BR>> Singularity images are executable. Executing one of the standard images provided by DV will give you an interactive shell in the container environment:
 {{{
[wgs03] ~ % lsb_release -d
Description: Red Hat Enterprise Linux Server release 6.9 (Santiago)
[wgs03] ~ % /project/singularity/images/U16.img
*************************************************************************
* You are now running a shell in a Singularity container providing an *
* Ubuntu 16.04 environment. Most things should just work as if you had *
* just logged in to such a system, but there are differences. *
* *
* For more info, please see https:://dvinfo.zeuthen.desy.de/Singularity *
*************************************************************************
[wgs03:U16] ~ % lsb_release -d
Description: Ubuntu 16.04.2 LTS
[wgs03:U16] ~ %
}}}
 Note the modified prompt. It's an attempt to make it more transparent in which environment you're currently working.
 * '''Run an arbitrary command''' in the context of the image.
 {{{
[wgs03] ~ % lsb_release -d
Description: Red Hat Enterprise Linux Server release 6.9 (Santiago)
[wgs03] ~ % singularity exec /project/singularity/images/SL5.img lsb_release -d
Description: Scientific Linux release 5.11 (Boron)
[wgs03] ~ %
}}}

== Availability ==

Singularity containers can be run on any current user accessible Linux system at DESY Zeuthen. In particular, Singularity is available on all

 * Linux Desktops
 * Workgroup Servers
 * Computes Nodes (Farm & Cluster)

The current set of standard images available in /project/singularity/images includes

 * Scientific Linux 5 (SL5.img)
 * Scientific Linux 6 (SL6.img)
 * Scientific Linux 7 (Sl7.img)
 * Ubuntu 16.04 LTS (U16.img)

These short image names are symbolic links to the current versions of the standard images for these operating systems. The specific images are planned to be kept around for about a month, but not forever.

Note users can copy a current image to any location to make sure this exact version will remain available.

Also note users can bring their own images and thus don't have to rely on the ones provided by DV. Creating those is rather simple and documented upstream. It currently requires root access though, so cannot be done on supported Linux systems in Zeuthen.

== Filesystems shared between Host and Container ==

Subject to availability on the host:

 * $HOME
 * /tmp
 * /afs
 * /lustre
 * /cvmfs
 * /batch
 * /acs (dCache)
 * /net (dCache)
 * /run/user
 * /proc
 * /dev


Users can specify additional folders on the host to be bind mounted inside the container when the container is started. This shouldn't be required. But if it is, please see `singularity help run` for info how to do it - and let DV know why you need to do this.

== Caveats ==

Overview

Singularity allows instantiating an alternative operating system environment on Linux systems.

In other words:

  • If you need to develop software in a Scientific Linux 7 environment on your Ubuntu 16.04 desktop and then execute it on a Scientific Linux 6 system, Singularity makes that possible.
  • If you need to run software from Ubuntu 16.04 (like an up to date PDF viewer) or other software requiring recent versions of some shared libraries (like the Atom editor) on the ancient SL6, Singularity makes that possible.
  • If you still have software for the discontinued SL5 around and need to run, build, develop or debug it on a supported system, Singularity makes that possible.

And all this without significant overhead. Sounds like fiction? It's fact. Right now. Some caveats do apply though.

Credit: Singularity was and is being developed at Berkeley Lab. Please see http://singularity.lbl.gov for upstream information.

Invocation

There are several ways to instantiate a Singularity container and run software in it. The two most important ones are:

  • "Execute" an image
    Singularity images are executable. Executing one of the standard images provided by DV will give you an interactive shell in the container environment:

    [wgs03] ~ % lsb_release -d                     
    Description:    Red Hat Enterprise Linux Server release 6.9 (Santiago)
    [wgs03] ~ % /project/singularity/images/U16.img
    *************************************************************************
    * You are now running a shell in a  Singularity container providing an  *
    * Ubuntu 16.04 environment. Most things should just work as if you had  *
    * just logged in to  such a system, but there are differences.          *
    *                                                                       *
    * For more info, please see https:://dvinfo.zeuthen.desy.de/Singularity *
    *************************************************************************
    [wgs03:U16] ~ % lsb_release -d
    Description:    Ubuntu 16.04.2 LTS
    [wgs03:U16] ~ %
    Note the modified prompt. It's an attempt to make it more transparent in which environment you're currently working.
  • Run an arbitrary command in the context of the image.

    [wgs03] ~ % lsb_release -d
    Description:    Red Hat Enterprise Linux Server release 6.9 (Santiago)
    [wgs03] ~ % singularity exec /project/singularity/images/SL5.img lsb_release -d
    Description:    Scientific Linux release 5.11 (Boron)
    [wgs03] ~ % 

Availability

Singularity containers can be run on any current user accessible Linux system at DESY Zeuthen. In particular, Singularity is available on all

  • Linux Desktops
  • Workgroup Servers
  • Computes Nodes (Farm & Cluster)

The current set of standard images available in /project/singularity/images includes

  • Scientific Linux 5 (SL5.img)
  • Scientific Linux 6 (SL6.img)
  • Scientific Linux 7 (Sl7.img)
  • Ubuntu 16.04 LTS (U16.img)

These short image names are symbolic links to the current versions of the standard images for these operating systems. The specific images are planned to be kept around for about a month, but not forever.

Note users can copy a current image to any location to make sure this exact version will remain available.

Also note users can bring their own images and thus don't have to rely on the ones provided by DV. Creating those is rather simple and documented upstream. It currently requires root access though, so cannot be done on supported Linux systems in Zeuthen.

Filesystems shared between Host and Container

Subject to availability on the host:

  • $HOME
  • /tmp
  • /afs
  • /lustre
  • /cvmfs
  • /batch
  • /acs (dCache)
  • /net (dCache)
  • /run/user
  • /proc
  • /dev

Users can specify additional folders on the host to be bind mounted inside the container when the container is started. This shouldn't be required. But if it is, please see singularity help run for info how to do it - and let DV know why you need to do this.

Caveats

Apptainer (last edited 2024-05-14 10:55:08 by GötzWaschk)