Closed DrorSh closed 3 years ago
I ended up forking a repo that builds a container from scratch. See here: https://github.com/DrorSh/singularity-rstudio-base
On Thu, Jan 7, 2021 at 11:49 PM Mike Cuoco notifications@github.com wrote:
@DrorSh https://github.com/DrorSh did you end up solving this? I'm running into the same error
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rocker-org/rocker/issues/431#issuecomment-756544116, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXHBYVSACYEAYYZKYMVE23SY2FFDANCNFSM4U4VNMGA .
Thanks @DrorSh . Just a note that a PR would be welcome as well, see https://github.com/rocker-org/rocker-versioned2
I'll be happy to contribute, but I couldn't actually get rocker to work. I am installing Rstudio from scratch on an ubuntu image. @granek might be able to help here.
@DrorSh no worries, we'll take a look at your container.
Note that the versioned stack, including rstudio images, is now already based on ubuntu (20.04) since R 4.0.0.
It has been a while since I wrestled with this error, so my memory is a bit rusty. If I remember correctly, you get that error when you try to run multiple instances of rserver on the same machine, or possible if different users try to run multiple instances on the same machine, because rserver puts a lock file somewhere common (/tmp I think).
It is relatively easy to fix with RStudio >=1.3 by setting up a temporary directory and running rserver with --server-data-dir
, like this (the trap line cleans up the temp directory when the container exits):
export TMPDIR="$(mktemp -d)"
trap "{ rm -rf $SESSION_INFO_FILE $TMPDIR; }" EXIT
rserver --server-data-dir "${TMPDIR}"
You can put this in a bash script then set the bash script as the %runscript
for your image, like I do in this script, which I set as the
You can do something similar with older versions of RStudio, but it is less elegant because you have to do it with bind mounting when you run the container.
Following the tutorial on the website
I get this error: