Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/cheaha/software/software.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we include a command line example to show how to use singularity directly on the compute node? For instance,
[$USER@c0xxx ~]$ singularity --version
singularity-ce version 4.1.2-1.el7

Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,10 @@ Cell Ranger is a proprietary software developed by [10x Genomics](https://www.10

## Singularity Containers

Containers are a very useful resource for installing software without needing administrator permission. Please read the full documentation about singularity and containers on our [main Singularity page](../../workflow_solutions/getting_containers.md#containers-on-cheaha).
Containers are a very useful resource for installing software without needing administrator permission. Please read the full documentation about Singularity and containers on our [main Singularity page](../../workflow_solutions/getting_containers.md#containers-on-cheaha).

<!-- markdownlint-disable MD046 -->
!!! note

Singularity is not installed via the [module system](./modules.md), in accordance with the most recent security recommendations. The `singularity` command may be used directly on any compute node, without the need for `module load`.
<!-- markdownlint-disable MD046 -->
14 changes: 4 additions & 10 deletions docs/education/case_studies.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,15 @@ Parbaricks 4.x are available as containers in the [NGC Catalog](https://catalog.

Parabricks 4.x container images can be installed on Cheaha using a Singularity container. More details on usage of Singularity container on Cheaha can be found in the [Containers Page](../workflow_solutions/getting_containers.md).

To install Parabricks using Singulairty, load the `Singularity 3.x` module from Cheaha as follows.

```bash
module load Singularity/3.5.2-GCC-5.4.0-2.26
```

Go to the NGC catalog page and copy the image path to pull the desired containers of Parabricks using Singularity. Here, the generic container is pulled using Singularity. The image path is in “nvcr.io/nvidia/clara/clara-parabricks" and the tag is 4.2.0-1. The container image name `parabricks-4.2.0-1.sif` is an user-derived name.
Singularity is installed directly on all nodes, in accordance with the latest security recommendations. To install Parabricks using Singularity, there is no need to load a module. Go to the NGC catalog page and copy the image path to pull the desired containers of Parabricks using Singularity. Here, the generic container is pulled using Singularity. The image path is in “nvcr.io/nvidia/clara/clara-parabricks" and the tag is 4.2.0-1. The container image name `parabricks-4.2.0-1.sif` is an user-derived name.

![!Parabricks container.](./images/parabricks_container.png)

```bash
singularity pull parabricks-4.2.0-1.sif docker://nvcr.io/nvidia/clara/clara-parabricks:4.2.0-1
```

After the image `parabricks-4.2.0-1.sif` is successfully created, you can run singularity image `parabricks-4.2.0-1.sif` with all input and output parameters. Various ways of running singularity image can be found in the [Containers Page](../workflow_solutions/getting_containers.md).
After the image `parabricks-4.2.0-1.sif` is successfully created, you can run Singularity image `parabricks-4.2.0-1.sif` with all input and output parameters. Various ways of running Singularity image can be found in the [Containers Page](../workflow_solutions/getting_containers.md).

Running `singularity shell` helps to navigate through the containers directory to verify the path of the software executable and later use the path outside the container to run the software. Following are the commands to run the container using `singularity shell` and traverse through the directories inside the contianer.

Expand Down Expand Up @@ -136,8 +130,8 @@ You can execute Parabricks on Cheaha using `amperenodes` partition. Maximum numb
module load Singularity/3.5.2-GCC-5.4.0-2.26
module load CUDA/11.6.0

#Run the "pbrun" executable from the singularity image "parabricks-4.2.0-1.sif", and pass the CUDA lib path to make it accessible within the container
singularity run --nv parabricks-4.2.0-1.sif pbrun fq2bam \
#Run the "pbrun" executable from the Singularity image "parabricks-4.2.0-1.sif", and pass the CUDA lib path to make it accessible within the container
singularity run --nv parabricks-4.2.0-1.sif /bin/pbrun fq2bam \
--ref parabricks_sample/Ref/Homo_sapiens_assembly38.fasta \
--in-fq parabricks_sample/Data/sample_1.fq.gz parabricks_sample/Data/sample_2.fq.gz \
--out-bam output.bam
Expand Down
12 changes: 3 additions & 9 deletions docs/workflow_solutions/getting_containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ It is often a good idea to search the Github repo for an application or pipeline

## Containers on Cheaha

Using containers on Cheaha bypasses the need to message support to install necessary software. Containers can be downloaded by any user into their personal space and used immediately without admin permission. as mentioned above, you will need to use Singularity containers on Cheaha. You can find all of the Singularity modules using the following command:

``` bash
module spider Singularity
```

It's highly recommended to only use Singularity versions 3+.
Using containers on Cheaha bypasses the need to message support to install necessary software. Containers can be downloaded by any user into their personal space and used immediately without admin permission. As mentioned above, you will need to use Singularity containers on Cheaha. In accordance with the most recent security recommendations, Singularity is installed directly on each node, so module commands are not needed to use Singularity.

### Pull Singularity Images

Expand Down Expand Up @@ -51,7 +45,7 @@ It's important to note that both `run` and `exec` enter the container as part of
<!-- markdownlint-disable MD046 -->
!!! important

`singularity shell` is not executable via shell scripts. Any singularity commands in a batch script should be `run` or `exec` instead.
`singularity shell` is not executable via shell scripts. Any Singularity commands in a batch script should be `run` or `exec` instead.
<!-- markdownlint-enable MD046 -->

### Running Singularity Containers With GPU Support
Expand All @@ -68,7 +62,7 @@ The `--nv` tells Singularity to bind the NVIDIA driver libraries and GPU devices

### Singularity Paths

By default, Singularity containers have limited access to the general filesystem. Containers get default access to the `/home` directory as well as the directory the container was run from. If you run the container from `$HOME` but try to access files in `$USER_DATA`, you will see an error. In order to give a container access to other directories, use the `-B` or `--bind` option when invoking the container. For instance, if I wanted to use `run` on a container that had an input option called `-i` and give the container access to a subfolder called `my_data` in a project space called `UABRC`, the singularity command would look like:
By default, Singularity containers have limited access to the general filesystem. Containers get default access to the `/home` directory as well as the directory the container was run from. If you run the container from `$HOME` but try to access files in `$USER_DATA`, you will see an error. In order to give a container access to other directories, use the `-B` or `--bind` option when invoking the container. For instance, if I wanted to use `run` on a container that had an input option called `-i` and give the container access to a subfolder called `my_data` in a project space called `UABRC`, the Singularity command would look like:

``` bash
singularity run --bind /data/project/UABRC/my_data image.sif -i /data/project/UABRC/my_data
Expand Down
Loading