Skip to content

fasrc/ood-containerized-rstudio-server

Repository files navigation

RStudio Server

Overview

An Open OnDemand Batch Connect app that launches RStudio Server in a Singularity container on a compute node. The containers are based on Rocker / Bioconductor images and provide a curated R environment including geospatial and Bioconductor packages.

FASRC Cannon

If you are running this app on FASRC's Cannon cluster, you can simply clone to ~/.fasrcood/dev and it will show in your Sandbox Apps.

Site-specific modifications

If you wish to use this app in a different cluster, some files need to edited to conform to your site's OOD implementation. All necessary and potential modifications are commented with a site-specific tag. For example, the file form.yml has for slurm partition:

  bc_queue:
# site-specific: change default partition
    value: "test"

List of files to edit:

  1. form.yml
  2. manifest.yml
  3. template/before.sh.erb
  4. template/script.sh.erb

This app assumes the cluster uses slurm as the scheduler. If you use a different scheduler, you wil likely need to modify other files.

Singularity containers

You can build the Singularity containers using the Singularity definition files provided in this repository:

Important

GPU support Releases 3.15 through 3.20 come from Bioconductor ml-verse and may have GPU support.

Testing

Before deploying a new release, perform the tests in Singularity/test_sing_images.

R packages

R_LIBS_USER

R_LIBS_USER is set to $HOME/R/ifxrstudio:${TAG}, e.g. RELEASE_3_13

R packages pinned version

R packages in RStudio Server are tied to a specific CRAN version.

FASRC serves a very wide range of researchers that use RStudio, from geospacial to informatics as well as a big group in the social sciences. This means that we have to be able to install many different R packages. When we install R packages directly in the cluster's OS, we have to select the right compilers, libraries, etc. This proved to be very time consuming for us and made users very frustrated.

Our solution was to develop a Singularity container with RStudio Server and many of the packages precompiled to ensure an easy installation (for most cases) for users. To implement this, we use the rocker project. The upstream (rocker) project pins to particular date for all R versions (except the latest version), and our (Singularity) images inherit that pinning; e.g. see this dockerfile.

The rationale for this is described a bit more in this GitHub issue which links to this page with the list of pinned CRAN versions.

On release 3.16, Nathan Weeks changed to the Bioconductor ml-verse project to support GPUs. The same pinning is ensured because bioconductor_docker:ml-verse uses the upstream rocker/ml-verse base image -- e.g., see this dockerfile for release 3.18.

However, the pinned date drawback is that newer packages (installed from source) may depend on newer versions of CRAN packages than exist at the pinned date.

After implementing this approach of using precompiled binaries packages, we noticed a big improvement for the majority of users and a considerable decrease in tickets requesting help with R packages. Unfortunately, there will always be edge cases. But, overall, this pinned version has worked well.

About

RStudio Server app for Open OnDemand

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors