Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update singularity.md #92

Merged
merged 1 commit into from
Apr 25, 2023
Merged

Update singularity.md #92

merged 1 commit into from
Apr 25, 2023

Conversation

e-kotov
Copy link
Contributor

@e-kotov e-kotov commented Apr 17, 2023

without --server-user=$(whoami) latest RStudio Server will not start in Singularity/Apptainer container with error [rserver] ERROR Attempt to run server as user 'rstudio-server' (uid 999) from account 'user_account' (uid 1001) without privilege, which is required to run as a different uid

without `--server-user=$(whoami)` latest RStudio Server will not start with error `[rserver] ERROR Attempt to run server as user 'rstudio-server' (uid 999) from account 'user_account' (uid 1001) without privilege, which is required to run as a different uid`
@eitsupi
Copy link
Member

eitsupi commented Apr 17, 2023

Thanks for your contribution!

@nathanweeks @frederikziebell Could you take a look at this? Thanks.

@e-kotov
Copy link
Contributor Author

e-kotov commented Apr 17, 2023

Ok, this seems to be NOT about the latest RStudio server, it seems this persists over many versions and seems to have more to do with how Rocker containers are packaged. In any case, I have done a lot of testing and on a clean Ubuntu VPS with either Singularity installed from source or with Apptainer installed from package manager, the line I suggested is critical to launch the rserver in container. If this option is not passed, Apptainer/Singularity tries to run the rsever process with rstudio-server user, which does not exist on parent system.

I stumbled upon this problem while testing for the rang R package. Details on my launch procedure are in this pull request. These are results of extensive testing on a VPS with both root and user privileges:
gesistsa/rang#134 (comment)

@e-kotov
Copy link
Contributor Author

e-kotov commented Apr 17, 2023

The solution with setting the --server-user was originally mentioned here rocker-org/rocker-versioned2#105 (comment) and I believe since then the discussion participants simply did not follow up to update the documentation, even though someone suggested to do that.

@nathanweeks
Copy link
Contributor

That's right; rserver --server-user=... has been required to run Rocker RStudio Server in a Singularity/Apptainer container since RStudio Server 2021.09.* per the referenced issue. A doc update is certainly in order.

FWIW, id -un is more "standard" (POSIX) than whoami (and on macOS the manual for whoami states 'The whoami utility has been obsoleted by the id(1) utility, and is equivalent to "id -un"...'), but in practice, it realistically shouldn't matter.

@eitsupi
Copy link
Member

eitsupi commented Apr 25, 2023

Sorry I forgot to take care of this!
And, thank you @nathanweeks for checking this!

I will merge this, so please let me know if it needs to be modified again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants