OSC / bc_osc_rstudio_server

Batch Connect - OSC RStudio Server
https://osc.github.io/Open-OnDemand/
MIT License
10 stars 18 forks source link

Singularity based RStudio #16

Closed MorganRodgers closed 5 years ago

MorganRodgers commented 5 years ago

This commit removes the requirement for using proot to create private /tmp spaces. Instead a Singularity container is used which mounts RStudio and its dependencies from the host, plus overrides the mount for /tmp using a new tmp dir rooted in PBSTMP. The Singularity container is as simple as can be requiring only the installation of which over the base CentOS 7. Since R or RStudio are not installed in the image then the image should not require a rebuild in the event of changes to RStudio.

The path to the image is currently in my home directory, and needs to be moved to a system directory, or the WIAG user's home. Also naming the image something slightly more useful than centos7.simg like rstudio_launcher_centos7.simg may be useful.

Heechang has installed the image in a system directory.

treydock commented 5 years ago

@MorganRodgers Talk with folks in SciApps about where to put the image. I think there may need to be a place in /usr/local (Owens) or /apps (Pitzer).

MorganRodgers commented 5 years ago

@treydock I have moved some of the host specific environment into a module, and confirmed that things work as expected.

For reference below is the module:

help([[This module sets up the RStudio server Singularity environment]])
setenv("SINGULARITY_BINDPATH","/usr/local,/etc/profile.d/lmod.sh,/usr/share/lmod,/opt/intel,/opt/mvapich2,/usr/lib64")
setenv("RSTUDIO_SERVER_IMAGE","/usr/local/project/ondemand/singularity/rstudio/rstudio_launcher_centos7.simg")

If this is amenable then I am going to ask SciApps to install/make the module and will merge this into production later today or early tomorrow.