# Singularity
Singularity is container software written at Lawrence Berkeley Labs.
If you need a specialized computing environment, you can use a Singularity container on Bridges. Your Singularity container will execute on Bridges-2 compute nodes and can use other Bridges-2 resources, including filesystems. Within your container you can use a different Unix operating system and any software you need. You can set up your Singularity container without any intervention from PSC staff.
If you have questions about using Singularity containers on Bridges-2 send email to `help@psc.edu`.
## Documentation
Singularity [documentation and examples](https://sylabs.io/docs/) at Sylabs.io.
## Usage
You can use the Singularity containers that are installed on Bridges-2 or you can bring your own. Execute the container on Bridges-2 compute nodes; containers cannot be executed on the front end nodes.
### Singularity images on Bridges-2
We have installed many of the NVIDIA GPU Cloud (NGC) containers as Singularity images on Bridges-2. These containers have been optimized for Volta architectures by NVIDIA, including rigorous quality assurance.
These containers can all be found on Bridges-2 under the directory /ocean/containers/ e.g., /ocean/containers/ngc/caffe.
NVIDIA requests that you create an account at http://ngc.nvidia.com if you will use any of these containers.
See also:
PSC documentation on Singularity for more details on Singularity use on Bridges-2
Additional information about the NVIDIA NGC Registry is at http://ngc.nvidia.com
Much more detail on the NGC containers at https://docs.nvidia.com/deeplearning/dgx/support-matrix/index.html
### Common Singularity commands
Some common commands are listed here, this document does not attempt to reinvent the wheel. For more information about Singularity, see the Singularity [documentation and examples](https://sylabs.io/docs/) at Sylabs.io.
#### `singularity shell`
shell
Start a shell within your container using the operating system you have set up your container to use.
#### `singularity exec`
exec
Run a single command within your container.
#### `singularity run`
Run a recipe script you have set up within your container. Using a recipe script forces users of your container to use a pre-established workflow.
##### `singularity pull`
##### `singularity help`
```
singularity --help
Linux container platform optimized for High Performance Computing (HPC) and
Enterprise Performance Computing (EPC)
Usage:
singularity [global options...]
Description:
Singularity containers provide an application virtualization layer enabling
mobility of compute via both application and environment portability. With
Singularity one is capable of building a root file system that runs on any
other Linux system where Singularity is installed.
Options:
-c, --config string specify a configuration file (for root or
unprivileged installation only) (default
"/usr/local/etc/singularity/singularity.conf")
-d, --debug print debugging information (highest verbosity)
-h, --help help for singularity
--nocolor print without color output (default False)
-q, --quiet suppress normal output
-s, --silent only print errors
-v, --verbose print additional information
--version version for singularity
Available Commands:
build Build a Singularity image
cache Manage the local cache
capability Manage Linux capabilities for users and groups
completion generate the autocompletion script for the specified shell
config Manage various singularity configuration (root user only)
delete Deletes requested image from the library
exec Run a command within a container
help Help about any command
inspect Show metadata for an image
instance Manage containers running as services
key Manage OpenPGP keys
oci Manage OCI containers
overlay Manage an EXT3 writable overlay image
plugin Manage Singularity plugins
pull Pull an image from a URI
push Upload image to the provided URI
remote Manage singularity remote endpoints, keyservers and OCI/Docker registry credentials
run Run the user-defined default command within a container
run-help Show the user-defined help for an image
search Search a Container Library for images
shell Run a shell within a container
sif Manipulate Singularity Image Format (SIF) images
sign Attach digital signature(s) to an image
test Run the user-defined tests within a container
verify Verify cryptographic signatures attached to an image
version Show the version for Singularity
Examples:
$ singularity help <command> [<subcommand>]
$ singularity help build
$ singularity help instance start
For additional help or support, please visit https://www.sylabs.io/docs/
```