Rstudio launcher for rhel/centos 8?

Greetings. We implemented RStudio app for RHEL7 using the ‘rserver-launcher-centos-7.simg’, pulled from shub://OSC/centos7-launcher.

We are now building the RStudio app for RHEL8 environment, and I’d like to implement what we did previously. Would someone be able to share an rstudio-server launcher image for CentOS8/RHEL8?

Thanks!

“Read the FULL documentation”. There is a singularity file example in place: 3. Setup Singularity — Open OnDemand 2.0.13 documentation

Did anyone succeed with this? I am diverted by a permissions issue preventing launch of RStudio-server (EasyBuild installation).

Hi Emily.

I’ve personally not set this up before. However, what is the permission issue that you are seeing?

Thanks,
-gerald

Hi, Gerald –

Thanks for checking in. This is built on RHEL8, and is the EasyBuild module RStudio-Server/1.4.1717-foss-2021a-Java-11-R-4.1.0
Here’s the full error, same whether launching via ‘rserver’ or ‘rstudio-server’:
$ rserver
23 Feb 2022 17:54:53 [rserver] ERROR system error 13 (Permission denied) [path: /var/run/rstudio-server, target-dir: ]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::createDirectory(const string&) const src/cpp/shared_core/FilePath.cpp:812; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:602

Cheers
~ Em

It appears that the application is attempting to create a folder or folder structure, but is unable to due to lack of permissions.

Do you know where it is trying to create this folder or folder structure?

The other question would be, does rserver need to run as root?

These are good questions, Gerald. I’m not knowledgeable about RStudio and how it operates. In our RHEL7 cluster, where we use the launcher image, both the rserver and r processes run as unprivileged users. Running the rserver from the module fails as well:
$ rserver
23 Feb 2022 19:07:13 [rserver] WARNING Running as root user is not recommended!; LOGGED FROM: virtual rstudio::core::ProgramStatus rstudio::server::Options::read(int, char* const*, std::ostream&) src/cpp/server/ServerOptions.cpp:275

Next on my list is to discover where rstudio logs operational output.

I’ve installed r and rstudio-server on my ubuntu system, to hopefully educate myself further on how this software should operate. Thanks for your interest.

The definition file from the ood docs just needs small amendment to use with Centos 8:
MirrorURL: http://mirror.centos.org/centos/%{OSVERSION}-stream/BaseOS/$basearch/os/

to reflect the altered file system supporting the new distribution (stream) model (I’m guessing a little on why the file system is different). Maybe it just reflects a different organization, RHEL7 vs 8.

I have an image and will test tomorrow.

1 Like

Hi Emily.

I am truly sorry for not being of more use. I will continue to work with you until you as long as needed.

Thanks,
-gerald

Thanks, Gerald – The container will build from a root shell, but it’s not accessible via ‘singularity shell’ to check it’s contents. If I build via ‘sudo which singularity --sandbox <name.sif> <name.def>’, the build fails.

  • [compt312 rstudio]$ sudo /usr/local/software/singularity/3.8.5/bin/singularity build --sandbox rstudio-launcher-centos-8.sif centos-8-launcher.def
    • [sudo] password for :
    • INFO: Starting build…
    • INFO: Skipping GPG Key Import
    • warning: Generating 18 missing index(es), please wait…
    • Error unpacking rpm package shadow-utils-2:4.6-16.el8.x86_64
    • Error unpacking rpm package libpwquality-1.4.4-3.el8.x86_64
    • Error unpacking rpm package util-linux-2.32.1-32.el8.x86_64
    • Error: Transaction failed
    • FATAL: While performing build: conveyor failed to get: while bootstrapping: exit status 1

Neglecting ‘–sandbox’, the build succeeds, with the failure upon testing:
hpc8 rstudio]$ singularity exec rstudio-launcher-centos-8.sif rserver
ERROR : No setuid installation found, for unprivileged installation use: ./mconfig --without-suid

Is there a way to verify the container, prior to attempt to implement it into the rstudio app workflow? The centos-7-launcher.sif shared through the ood docs allows to shell into it, so I’m assuming something has gone wrong in my container build.

The definition file I’m using is as follows:
# Ensure that the guest is the same OS type as the compute hosts that it will run on
# Here we use CentOS 8
Bootstrap: yum
OSVersion: 8
MirrorURL: http://mirror.centos.org/centos/%{OSVERSION}-stream/BaseOS/$basearch/os/
Include: yum

%labels
Maintainer OSC Gateways

%help
This will run RStudio Server which must be mounted with dependencies into the container

%apprun rserver
if ! [[ “$USER_PATH” = “” ]]; then
export PATH="$USER_PATH"
fi

exec rserver “${@}”

%runscript
if ! [[ “$USER_PATH” = “” ]]; then
export PATH="$USER_PATH"
fi

exec rserver “${@}”

Thanks for your continued patience!
~ Em

Ahh…self-inflicted wounds. Turns out there is a problem with the singularity build on the RHEL8 cluster. Building from the definition file on the RHEL7 cluster generated an accessible container.

Will look to implement the app soon, using the centos-8-launcher.sif

Cheers

1 Like