Skip to content

Optimize renv cache behavior for CI #100

Description

@jasonratcliff

The rocker geospatial docker image contains a site-specific library with a number of pre-installed R packages in addition to the system library dependencies (see also: archived geospatial toolkit).

Related

Notes

Location of site-specific library set by install_R_source.sh:

## Fix library path
echo "R_LIBS=\${R_LIBS-'${R_HOME}/site-library:${R_HOME}/library'}" >>"${R_HOME}/etc/Renviron.site"
$ cat ${R_HOME}/etc/Renviron.site
R_LIBS=${R_LIBS-'/usr/local/lib/R/site-library:/usr/local/lib/R/library'}
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/bin/linux:/usr/local/texlive/bin/linux/

Get paths in R session, without call to renv::activate():

> .Library.site
[1] "/usr/local/lib/R/site-library"
> .Library
[1] "/usr/local/lib/R/library"
> .libPaths()
[1] "/usr/local/lib/R/site-library" "/usr/local/lib/R/library"  

Docker Image

renv

> names(renv::paths)
[1] "root"     "library"  "lockfile" "settings" "cache"    "sandbox" 

Metadata

Metadata

Assignees

No one assigned

    Labels

    dockerDocker ContainergithubGitHub Actions | Continuous Integration (CI)gitpodGitpod | Continuous Development Environment (CDE)

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions