R/RStudio template with personal library

Currently, installing packages in the R/RStudio renku project isn’t possible because the default libraries (/usr/local/lib/R/site-library and /usr/local/lib/R/library) aren’t writeable.

I think it would be very useful if users had a personal library (for example ~/R) they could install packages into. In addition to that directory, adding .libPaths("~/R/") to .Renviron would make this work out of the box.

We are updating the R image. But in the meantime, as a workaround: https://renkulab.io/projects/cchoirat/testaer/files/blob/Dockerfile:

RUN chmod -R 777 /usr/local/lib/R/site-library
1 Like

I currently get

...
Step 8/10 : COPY requirements.txt /tmp/
 ---> Using cache
 ---> 1048b2ac1da7
Step 9/10 : RUN pip3 install -r /tmp/requirements.txt
 ---> Using cache
 ---> 739a3da14cbf
Step 10/10 : RUN chmod -R 777 /usr/local/lib/R/site-library ---> Running in b4d40acaf518
chmod: changing permissions of '/usr/local/lib/R/site-library': Operation not permitted
chmod: changing permissions of '/usr/local/lib/R/site-library/docopt': Operation not permitted
chmod: changing permissions of '/usr/local/lib/R/site-library/docopt/NEWS': Operation not permitted
chmod: changing permissions of '/usr/local/lib/R/site-library/docopt/html': Operation not permitted
chmod: changing permissions of '/usr/local/lib/R/site-library/docopt/html/00Index.html': Operation not permitted
...

You need to be root, so before line

USER ${NB_USER}
1 Like