RStudio without Singularity?

I thought I’d read that OOD was now able to run RStudio without relying on Singularity but can’t find documentation to support that notion. Was I dreaming??

Thanks - Susan Litzinger
PSC

You may have seen something by Morgan to use unshare though I don’t believe we got it working (you need to be ‘root’ with subuids so there’s added complexity).

I’m only now realizing that rstuido is open source so maybe they just fixed the bug? I haven’t checked, but it seems possible that they did.

The bug was this: rstudio server creates a temporary file that’s hard coded. Meaning, you cannot have 2 instances of it (2 users) running on the same machine. Unless you chroot the tmp directory, which we do through singularity.

That’s the the only reason we’re using singularity, so if that simple single thing got fixed, or we could unshare a different mount, or figure out if R_SESSION_TMPDIR is useful (I just happened upon this looking at some of the tickets) or whatever we would switch because it does seem to add to folks’ confusion.

Hope that helps!

We’re not using singularity to run rstudio. I modified the rserver source to support a “–server-secure-key-dir” option to over-ride the hardcoded “/tmp/rstudio-server”. I’m happy to share my patch but I’m not sure how to include a file here.

–Mike Dugan

Yes! Maybe we can provide the patch upstream.

I’ve found this ticket of theirs that I’m going to start commenting on saying we need this.

Yea it seems that Rstudio 1.3 that’s in beta right now resolves this issue. Though I’m trying to get it to run, in preparation for their release, and am having a bit of trouble. I don’t know what QT_QPA_PLATFORM we should use.

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/users/PZS0714/johrstrom/temp/rstudio/rstudio-1.3.895/bin/platforms" ...
loaded library "/users/PZS0714/johrstrom/temp/rstudio/rstudio-1.3.895/plugins/platforms/libqxcb.so"
qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Mike, I would be also curious to see the fix.

I am also wondering how did you install the RStudio Server. We install all our apps here as non-root and I haven’t been able to find any info it it’s possible to install the RStudio Server this way. We were dabbling with installing it into the OS image but that’s something our admins don’t like for non RedHat official RPMs, and they were also concerned about security implications of running the server.

That’s the other reason why we are running it in the container.

MC

I’m a novice with discourse and can’t figure out how to attach a file here without mangling it.
So here’s my patch:

https://scv.bu.edu/server-secure-key-dir-option.patch

We also install apps as non-root into a shared filesystem so they are available to every compute node.
So I configured the rstudio build to install into /usr/local/ood/rstudio-server. The files are owned my me
but the server is started from the batch script and runs as the user.

–Mike