wiki:cypress/RunningRWithSingularity

Version 6 (modified by Carl Baribault, 3 days ago) ( diff )

Added warning for "latest" image tag

Running R using Singularity on Cypress

Besides ​ Dockerhub , the ​ Rocker Project is a website established to provide docker containers in the form of docker files specifically for the R environment.

In order to use any of those docker files on Cypress, we'll need to construct a container file - usually with .sif file extension - suitable for use with Singularity on Cypress. For reference in the following, see Singularity.

Here's the sequence of commands to create and simply test a container file for the latest available R version - as provided the above website.

Start the interactive session

First, start an interactive session.

For Workshop : If your account is in the group workshop, please use the following.

[tulaneID@cypress1 ~]$idev --partition=workshop7 -c 2 # request 2 cores in the partition workshop7
Requesting 1 node(s)  task(s) to normal queue of workshop7 partition
1 task(s)/node, 2 cpu(s)/task, 0 MIC device(s)/node
Time: 0 (hr) 60 (min).
0d 0h 60m
Submitted batch job 3287405
JOBID=3287405 begin on cypress01-060
--> Creating interactive terminal session (login) on node cypress01-060.
--> You have 0 (hr) 60 (min).
--> Assigned Host List : /tmp/idev_nodes_file_tulaneID
Last login: Tue Jan 13 11:58:39 2026 from cypress1.cm.cluster
[tulaneID@cypress01-060 ~]$

Non-workshop

[tulaneID@cypress1 ~]idev --partition=centos7 # start an interactive session in the partition centos7
Requesting 1 node(s)  task(s) to normal queue of centos7 partition
1 task(s)/node, 20 cpu(s)/task, 0 MIC device(s)/node
Time: 0 (hr) 60 (min).
0d 0h 60m
Submitted batch job 3288388
JOBID=3288388 begin on cypress01-066
--> Creating interactive terminal session (login) on node cypress01-066.
--> You have 0 (hr) 60 (min).
--> Assigned Host List : /tmp/idev_nodes_file_tulaneID
Last login: Tue Jan 13 14:09:07 2026 from cypress2.cm.cluster
[tulaneID@cypress01-066 ~]$

Warning: Using container image with tag "latest"

If you use an image file with the "latest" tag for an extended period of time, then you may no longer be using the latest provided version of the image.

As long as your work requires the most recent version of the image and its software, you should observe when the developers of the image update that image in the image repository - such as dockerhub, etc.

In the following sections we refer to container images with "latest" tag for convenience only.

Construct and check the container image file

Then proceed as follows to construct the .sif container image file and check the R version.

[tulaneID@cypress01-060 ~]$module load singularity/3.9.0 # load the singularity module
[tulaneID@cypress01-060 ~]$singularity pull docker://rocker/r-base:latest # takes a few minutes to construct file r-base_latest.sif
...
[tulaneID@cypress01-060 ~]$singularity exec r-base_latest.sif R --version # check the version of R
R version 4.6.1 (2026-06-24) -- "Happy Hop"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.

[tulaneID@cypress01-066 ~]$

Other R container images available via the Rocker Project and Dockerhub

Keep in mind that the following examples assume that you've already entered an interactive session using idev --partition=centos7.

For Workshop: Use idev --partition=workshop7 -c 2

​ tidyverse

[tulaneID@cypress01-057 ~]$singularity pull docker://rocker/tidyverse:latest
...
[tulaneID@cypress01-057 ~]$singularity exec tidyverse_latest.sif Rscript -e 'packageVersion("tidyverse")'
[1] '2.0.0'
[tulaneID@cypress01-057 ~]$

​ Seurat

[tulaneID@cypress01-057 ~]$singularity pull docker://satijalab/seurat:latest
...
[tulaneID@cypress01-057 ~]$singularity exec seurat_latest.sif Rscript -e 'packageVersion("Seurat")'
[1] '4.3.0'
[tulaneID@cypress01-057 ~]

See also Running RStudio using Singularity on Cypress

See here.

Note: See TracWiki for help on using the wiki.