obiba / rock

R server with a REST API
GNU General Public License v3.0
3 stars 1 forks source link

Unable to set package repos #14

Closed tuxmaster5000 closed 1 year ago

tuxmaster5000 commented 1 year ago

Hi, it will be impossible to set the repo from where the R packages will be loaded from. You can set in /etc/rock/Rprofile.R, what ever you will, it will ignored. Sample:

options(c(repos=c(cran="foo.bar"), HTTPUserAgent=""))

Demo

curl --user administrator:password -X POST "http://localhost:8085/rserver/packages?name=jsonlite" or what ever for module

will always result in:

Installing package into ‘/var/lib/rock/R/library’ (as ‘lib’ is unspecified) trying URL 'https://cloud.r-project.org/src/contrib/jsonlite_1.8.7.tar.gz'

You can set what you want, only cloud.r-project.org will be used. Use case: load packages from internal RSPM server.

ymarcon commented 1 year ago

There is a r.repos setting in the application.yml file. See doc: https://rockdoc.obiba.org/en/latest/admin/configuration.html#r-server-configuration

tuxmaster5000 commented 1 year ago

Hi @ymarcon , then you should remove the option line and the note in: https://github.com/obiba/rock/blob/master/src/dist/conf/Rprofile.R Because it will looks like that this will be the right place.