Hi,
I'm running RStudio Server from a Rocker container using Singularity.
I can run the container and access RStudio Server in my browser with appropriate tunnelling
However, I've been struggling with making directories outside my home directory accessible in RStudio.
The minimal working call would be something like:
mkdir -p run var-lib-rstudio-server
printf 'provider=sqlite\ndirectory=/var/lib/rstudio-server\n' > database.conf
singularity exec \
--bind run:/run,var-lib-rstudio-server:/var/lib/rstudio-server \
--bind database.conf:/etc/rstudio/database.conf \
tidyverse_latest.sif \
rserver --server-user=${USER} --www-address=127.0.0.1
I want to access files stored in a share mounted at /data
.
So I added this option to the singularity call --bind /data \
, which indeed makes it available from the shell, but not from within RStudio.
I then read about Restricted Directories, so I created a custom session config file and tried to bind it too, but this doesn't help…
My call now looks like
mkdir -p run var-lib-rstudio-server
printf 'provider=sqlite\ndirectory=/var/lib/rstudio-server\n' > database.conf
printf 'restrict-directory-view=0\ndirectory-view-allow-list=/data\n' > rsession.conf
singularity exec \
--bind /data \
--bind run:/run,var-lib-rstudio-server:/var/lib/rstudio-server \
--bind database.conf:/etc/rstudio/database.conf \
--bind rsession.conf:/etc/rstudio/rsession.conf \
tidyverse_latest.sif \
rserver --server-user=${USER} --www-address=127.0.0.1
I would be very grateful for guidance on how to access these files. It seems like I'm not the first to run on this issue (see e.g. RStudio does not see some directories on server cluster) but I can't find relevant instructions. Thank you very much.