rocker-org / rocker-versioned

Run current & prior versions of R using docker
https://hub.docker.com/r/rocker/r-ver
GNU General Public License v2.0
297 stars 169 forks source link

building a singularity container #134

Closed kkmann closed 5 years ago

kkmann commented 5 years ago

Hey, I currently use the rocker images as a basis for custom singularity containers. Works fine for command line use but ideally, I'd like to be able to share a full-fledged R Studio server in a singularity container (I have collaborators who cannot run containers as root). Any ideas of how I could achieve that? Has anybody tried this before? Are there technical reasons why that would not work?

kkmann commented 5 years ago

probably not gonna happen since https://support.rstudio.com/hc/en-us/articles/218545408-Root-requirements-for-RStudio-Server clearly states that RStudio server requires root, right?

eddelbuettel commented 5 years ago

Yes that was my gut feel but I have not had a chance to dig into.

cboettig commented 5 years ago

@kkmann We have some user-contributed documentation on this at https://www.rocker-project.org/use/singularity/, so I believe folks have gotten it to work but also haven't tested myself.

kkmann commented 5 years ago

Cool thanks for the input, I'll dig in a bit and reopen if I find something. It would be a shame if it wasn't possible - Jupyter works perfectly fine, but I don't really like their notebook format...

kkmann commented 5 years ago

Hm, I couldn't get the example working (singularity 2.6.0 / Ubuntu 18.10). I get a pop up 'error during transmission' but judging from the description, it seems to be possible to run rstudio server in a singularity container oO. I am not quite sure whether this is the right place to continue the discussion, so please feel free to close this issue if it is not. Maybe you could point me to whoever wrote that rocker/singularity tutorial (or point them here)?

eddelbuettel commented 5 years ago

The wiki page is for any Rocker container, ie r-base.

You generalize this to hoping RStudio may magically run. I think you already put your own finger on the critical issue: unless you find a way to run RStudio 'rootless' you will be out of luck. To me, this seems like an impedance mismatch: I am all for smaller/simpler/lighter/... containers useable in bulk for singularity (ie clustered). RStudio Server simply does not fit that bill for me. YMMV but I still think we can only close this here.

kkmann commented 5 years ago

I see, yeah, already using them for command line workflows and that works perfectly fine, just the server is probably not going to happen :(

thx again!

eddelbuettel commented 5 years ago

Ok -- happy to reopen if a "trick" can found but this seems to be a design issue.

And if you have good tips to add to the Singularity wiki we have here we'd be happy to have them :)

cboettig commented 5 years ago

@kkmann I believe @nathanweeks has had this working before, perhaps he can shed some light on this.

nathanweeks commented 5 years ago

@kkmann : The SLURM job script mentioned in the Rocker Singularity wiki has been used for some time in production on a fairly generic compute cluster. AFAIK, other HPC centers use Open OnDemand to run RStudio Server frequently via Singularity (e.g., using a "pure" Singularity image such as: https://github.com/nickjer/singularity-rstudio).

Could you provide the command / script you're using to run RStudio Server under Singularity?

eddelbuettel commented 5 years ago

Ah. maybe something succinct could be added to the documentation here as well?