github.com/hpcng/singularity@v3.1.1+incompatible/docs/2.x-slurm/README.md (about)

     1  
     2  Singularity plugin for Slurm
     3  ============================
     4  
     5  This plugin allows users to execute their Slurm jobs within a Singularity container without
     6  having to execute Singularity directly.  This assists in simplifying the invocation of the
     7  container and hiding the implementation details.
     8  
     9  To enable the plugin, add the following line to the Slurm plugin configuration (`/etc/slurm/plugstack.conf`):
    10  
    11  ```
    12  required singularity.so
    13  ```
    14  
    15  This works if Singularity is installed as a system package.  If the install prefix is `/opt/singularity`, then
    16  one would have:
    17  
    18  ```
    19  required /opt/singularity/lib/slurm/singularity.so
    20  ```
    21  
    22  Note that the sysadmin may provide a default image that will be utilized if the user doesn't provide one:
    23  
    24  ```
    25  required singularity.so default_image=/cvmfs/cernvm-prod.cern.ch/cvm3
    26  ```
    27  
    28  Finally, a user may select their image through the `--singularity-image` optional argument:
    29  
    30  ```
    31  srun --singularity-image=/cvmfs/cms.cern.ch/rootfs/x86_64/centos7/latest ls -lh /
    32  ```
    33  
    34  Within a batch file, you would append this header:
    35  
    36  ```
    37  #SBATCH --singularity-image=/cvmfs/cms.cern.ch/rootfs/x86_64/centos7/latest
    38  ```
    39