Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
21 stars 12 forks source link

[Task] Install R packages from binary instead of sources #1841

Closed tschaffter closed 11 months ago

tschaffter commented 12 months ago

What projects is this story for?

OpenChallenges

As a user, I want

As a Developer, I want the R packages installed with renv::restore() to be installed from binary instead of built from sources so that I can have them installed much faster.

Description

Installing the R packages captured in renv.lock of the OC API Client for R takes about 20 minutes when built from source. This operation takes too much time and hinder DX (Developer Experience) locally and later in CI workflows.

> renv::restore()

...
- Installing devtools ...                       OK [built from source and cached in 7.6s]
- Installing lazyeval ...                       OK [built from source and cached in 2.7s]
- Installing rex ...                            OK [built from source and cached in 2.4s]
- Installing xmlparsedata ...                   OK [built from source and cached in 1.8s]
- Installing lintr ...                          OK [built from source and cached in 10s]

 ———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Successfully ran target prepare-r for project openchallenges-api-client-r (20m)

Installing the R packages from pre-compiled binaries instead of building them from source would be much faster.

References:

Acceptance criteria

No response

Tasks

No response

Anything else?

No response

Have you linked this story to a GitHub Project?

tschaffter commented 12 months ago

Specifying options(pkgType="binary")

This does not work as packages are still installed from source.

> options(pkgType="binary")
> renv::restore()
...
- Downloading httr2 from CRAN ...               OK [120.5 Kb in 0.25s]
- Downloading ini from CRAN ...                 OK [3.4 Kb in 0.2s]
- Downloading lazyeval from CRAN ...            OK [81.5 Kb in 0.22s]
- Downloading lintr from CRAN ...               OK [2.2 Mb in 0.93s]
- Downloading rex from CRAN ...                 OK [91.4 Kb in 0.25s]
- Downloading xmlparsedata from CRAN ...        OK [8.8 Kb in 0.18s]

# Installing packages --------------------------------------------------------

- Installing R6 ...                             OK [built from source and cached in 2.0s]
- Installing Rcpp ...                           OK [built from source and cached in 36s]
- Installing sys ...                            OK [built from source and cached in 2.2s]
- Installing askpass ...                        OK [built from source and cached in 1.9s]
- Installing backports ...                      OK [built from source and cached in 2.6s]
- Installing base64enc ...                      OK [built from source and cached in 2.1s]
- Installing brew ...                           OK [built from source and cached in 2.2s]
- Installing brio ...                           OK [built from source and cached in 2.5s]
- Installing rlang ...                          OK [built from source and cached in 18s]
...

Source

tschaffter commented 12 months ago

Using options(install.packages.check.source = "no") does not seem to help either.

tschaffter commented 12 months ago

libjpeg.so.8: cannot open shared object file: No such file or directory

This issue arises when installing ragg from its binary but not when installing the packages from their source.

> renv::restore(repos="https://packagemanager.rstudio.com/all/__linux__/focal/latest")
...
- Installing systemfonts ...                    OK [installed binary and cached in 0.79s]
- Installing textshaping ...                    OK [installed binary and cached in 0.72s]
- Installing ragg ...                           FAILED
/opt/R/4.2.3/lib/R/bin/R --vanilla -s -f '/tmp/Rtmp11KL4M/renv-install-271660f3c22e'
================================================================================

Error: package or namespace load failed for ‘ragg’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/workspaces/sage-monorepo/libs/openchallenges/api-client-r/renv/staging/1/ragg/libs/ragg.so':
  libjpeg.so.8: cannot open shared object file: No such file or directory
Execution halted

Error: error testing if 'ragg' can be loaded [error code 1]
Traceback (most recent calls last):
14: renv::restore(repos = "https://packagemanager.rstudio.com/all/__linux__/focal/latest")
13: renv_restore_run_actions(project, diff, current, lockfile, rebuild)
12: renv_install_impl(records)
11: renv_install_staged(records)
10: renv_install_default(records)
 9: handler(package, renv_install_package(record))
 8: renv_install_package(record)
 7: withCallingHandlers(renv_install_package_impl(record), error = function(e) writef("FAILED"))
 6: renv_install_package_impl(record)
 5: withCallingHandlers(if (isbin) renv_install_test(package), error = function(err) unlink(installpath, 
        recursive = TRUE))
 4: renv_install_test(package)
 3: renv_system_exec(command = R(), args = c("--vanilla", "-s", "-f", 
        renv_shell_path(script)), action = sprintf("testing if '%s' can be loaded", 
        package))
 2: abort(sprintf("error %s [error code %i]", action, status), body = renv_system_exec_details(command, 
        args, output))
 1: stop(fallback)
> 

The missing library is no longer available to Debian Bullseye. A solution is:

wget http://archive.ubuntu.com/ubuntu/pool/main/libj/libjpeg-turbo/libjpeg-turbo8_2.0.3-0ubuntu1_amd64.deb
sudo dpkg -i libjpeg-turbo8_2.0.3-0ubuntu1_amd64.deb

A new error is then the same as described here:

> renv::restore(repos="https://packagemanager.rstudio.com/all/__linux__/focal/latest")
...
- Installing systemfonts ...                    OK [linked from cache in 0.00081s]
- Installing textshaping ...                    OK [linked from cache in 0.00072s]
- Installing ragg ...                           FAILED
/opt/R/4.2.3/lib/R/bin/R --vanilla -s -f '/tmp/Rtmp11KL4M/renv-install-27161c91cb92'
================================================================================

Error: package or namespace load failed for ‘ragg’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/workspaces/sage-monorepo/libs/openchallenges/api-client-r/renv/staging/1/ragg/libs/ragg.so':
  /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /workspaces/sage-monorepo/libs/openchallenges/api-client-r/renv/staging/1/ragg/libs/ragg.so)
Execution halted
tschaffter commented 12 months ago

I tried to remove ragg from the lock file, but then installing stringi fails.

> renv::restore(repos="https://packagemanager.rstudio.com/all/__linux__/focal/latest")
...
- Installing stringi ...                        FAILED
/opt/R/4.2.3/lib/R/bin/R --vanilla -s -f '/tmp/Rtmp11KL4M/renv-install-271610625691'
================================================================================

Error: package or namespace load failed for ‘stringi’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/workspaces/sage-monorepo/libs/openchallenges/api-client-r/renv/staging/1/stringi/libs/stringi.so':
  libicui18n.so.66: cannot open shared object file: No such file or directory
Execution halted
tschaffter commented 12 months ago

Installing libraries with issues manually?

Install ragg (what if the cache is not available)?

> install.packages('ragg')
The following package(s) will be installed:

- cpp11       [0.4.5]
- ragg        [1.2.5]
- systemfonts [1.0.4]
- textshaping [0.3.6]

These packages will be installed into "~/.cache/R/renv/library/api-client-r-0a9b12e7/R-4.2/x86_64-pc-linux-gnu".

Do you want to proceed? [Y/n]: y

# Installing packages --------------------------------------------------------

- Installing cpp11 ...                          OK [linked from cache in 0.00042s]
- Installing systemfonts ...                    OK [linked from cache in 0.00038s]
- Installing textshaping ...                    OK [linked from cache in 0.00041s]
- Installing ragg ...                           OK [linked from cache in 0.00042s]

Successfully installed 4 packages in 92 milliseconds.

Install stringi:

> install.packages('stringi')

Running again renv::restore(...) now works.

tschaffter commented 12 months ago

Regenerating the lock file

First, set the repos:

options(repos = c(POSIT = "https://packagemanager.posit.co/all/__linux__/focal/latest", CRAN = "https://mirror.las.iastate.edu/CRAN"))

Then regenerate the lock file after removing it (trying the explicit mode):

renv::init()

There are a few packages that cannot be installed. I was hoping that they would then default to using CRAN.

> renv::init()
...
- Installing remotes ...                        OK [installed binary and cached in 0.77s]
- Installing brew ...                           OK [installed binary and cached in 0.69s]
- Installing roxygen2 ...                       FAILED
- Installing rversions ...                      OK [installed binary and cached in 0.63s]
- Installing urlchecker ...                     OK [installed binary and cached in 0.71s]
- Installing clipr ...                          OK [installed binary and cached in 0.72s]
- Installing credentials ...                    OK [installed binary and cached in 0.71s]
- Installing rstudioapi ...                     OK [installed binary and cached in 0.72s]
- Installing zip ...                            OK [installed binary and cached in 0.88s]
- Installing gert ...                           OK [installed binary and cached in 1.2s]
- Installing gitcreds ...                       OK [installed binary and cached in 0.83s]
- Installing httr2 ...                          OK [installed binary and cached in 0.97s]
- Installing ini ...                            OK [installed binary and cached in 0.71s]
- Installing gh ...                             OK [installed binary and cached in 0.81s]
- Installing usethis ...                        OK [installed binary and cached in 1.2s]
- Installing devtools ...                       FAILED

The following package(s) were not installed successfully:

- [stringi]: error testing if 'stringi' can be loaded [error code 1 <...>
- [stringr]: error testing if 'stringr' can be loaded [error code 1 <...>
- [ragg]: error testing if 'ragg' can be loaded [error code 1]
/ <...>
- [profvis]: error testing if 'profvis' can be loaded [error code 1 <...>
- [roxygen2]: error testing if 'roxygen2' can be loaded [error code  <...>
- [devtools]: error testing if 'devtools' can be loaded [error code  <...>

You may need to manually download and install these packages.

The following package(s) will be updated in the lockfile:

# CRAN -----------------------------------------------------------------------
- renv        [* -> 1.0.0]

# RSPM -----------------------------------------------------------------------
- askpass     [* -> 1.1]
- base64enc   [* -> 0.1-3]
- brio        [* -> 1.1.3]
- callr       [* -> 3.7.3]
- cli         [* -> 3.6.1]
- crayon      [* -> 1.5.2]
- curl        [* -> 5.0.1]
- desc        [* -> 1.4.2]
- diffobj     [* -> 0.3.5]
- digest      [* -> 0.6.33]
- ellipsis    [* -> 0.3.2]
- evaluate    [* -> 0.21]
- fansi       [* -> 1.0.4]
- fs          [* -> 1.6.3]
- glue        [* -> 1.6.2]
- httr        [* -> 1.4.6]
- jsonlite    [* -> 1.8.7]
- lifecycle   [* -> 1.0.3]
- magrittr    [* -> 2.0.3]
- mime        [* -> 0.12]
- openssl     [* -> 2.1.0]
- pillar      [* -> 1.9.0]
- pkgconfig   [* -> 2.0.3]
- pkgload     [* -> 1.3.2.1]
- praise      [* -> 1.0.0]
- processx    [* -> 3.8.2]
- ps          [* -> 1.7.5]
- R6          [* -> 2.5.1]
- rematch2    [* -> 2.1.2]
- rlang       [* -> 1.1.1]
- rprojroot   [* -> 2.0.3]
- sys         [* -> 3.4.2]
- testthat    [* -> 3.1.10]
- tibble      [* -> 3.2.1]
- utf8        [* -> 1.2.3]
- vctrs       [* -> 0.6.3]
- waldo       [* -> 0.5.1]
- withr       [* -> 2.5.0]

The version of R recorded in the lockfile will be updated:
- R           [* -> 4.2.3]

- Lockfile written to '/workspaces/sage-monorepo/libs/openchallenges/api-client-r/renv.lock'.
- renv activated -- please restart the R session.
tschaffter commented 12 months ago

Multi-repo update

I was able to generate a multi-repo renv.lock that successfully install packages from binaries and from source for those packages that fail to install on Debian. Here is how I generated this lock file.

  1. options(repos = c(POSIT = "https://packagemanager.posit.co/all/__linux__/focal/latest", CRAN = "https://mirror.las.iastate.edu/CRAN"))
  2. renv::init()
  3. Some packages will fail to install on Debian
  4. options(repos = c(CRAN = "https://mirror.las.iastate.edu/CRAN"))
  5. renv::init()
  6. The missing packages are installed, the binary ones are reused
  7. options(repos = c(POSIT = "https://packagemanager.posit.co/all/__linux__/focal/latest", CRAN = "https://mirror.las.iastate.edu/CRAN"))
  8. renv::snapshot()
$ R

R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

# Bootstrapping renv 1.0.0 ---------------------------------------------------
- Downloading renv ... OK
- Installing renv  ... OK

- Project '/workspaces/sage-monorepo/libs/openchallenges/api-client-r' loaded. [renv 1.0.0]
- None of the packages recorded in the lockfile are installed.
- Using `renv::restore()` to restore the project library.
The following package(s) will be updated:

# CRAN -----------------------------------------------------------------------
- devtools      [* -> 2.4.5]
- profvis       [* -> 0.3.8]
- ragg          [* -> 1.2.5]
- roxygen2      [* -> 7.2.3]
- stringi       [* -> 1.7.12]
- stringr       [* -> 1.5.0]

# RSPM -----------------------------------------------------------------------
- askpass       [* -> 1.1]
- base64enc     [* -> 0.1-3]
- brew          [* -> 1.0-8]
- brio          [* -> 1.1.3]
- bslib         [* -> 0.5.0]
- cachem        [* -> 1.0.8]
- callr         [* -> 3.7.3]
- cli           [* -> 3.6.1]
- clipr         [* -> 0.8.0]
- commonmark    [* -> 1.9.0]
- cpp11         [* -> 0.4.5]
- crayon        [* -> 1.5.2]
- credentials   [* -> 1.3.2]
- curl          [* -> 5.0.1]
- desc          [* -> 1.4.2]
- diffobj       [* -> 0.3.5]
- digest        [* -> 0.6.33]
- downlit       [* -> 0.4.3]
- ellipsis      [* -> 0.3.2]
- evaluate      [* -> 0.21]
- fansi         [* -> 1.0.4]
- fastmap       [* -> 1.1.1]
- fontawesome   [* -> 0.5.1]
- fs            [* -> 1.6.3]
- gert          [* -> 1.9.2]
- gh            [* -> 1.4.0]
- gitcreds      [* -> 0.1.2]
- glue          [* -> 1.6.2]
- highr         [* -> 0.10]
- htmltools     [* -> 0.5.5]
- htmlwidgets   [* -> 1.6.2]
- httpuv        [* -> 1.6.11]
- httr          [* -> 1.4.6]
- httr2         [* -> 0.2.3]
- ini           [* -> 0.3.1]
- jquerylib     [* -> 0.1.4]
- jsonlite      [* -> 1.8.7]
- knitr         [* -> 1.43]
- later         [* -> 1.3.1]
- lifecycle     [* -> 1.0.3]
- magrittr      [* -> 2.0.3]
- memoise       [* -> 2.0.1]
- mime          [* -> 0.12]
- miniUI        [* -> 0.1.1.1]
- openssl       [* -> 2.1.0]
- pillar        [* -> 1.9.0]
- pkgbuild      [* -> 1.4.2]
- pkgconfig     [* -> 2.0.3]
- pkgdown       [* -> 2.0.7]
- pkgload       [* -> 1.3.2.1]
- praise        [* -> 1.0.0]
- prettyunits   [* -> 1.1.1]
- processx      [* -> 3.8.2]
- promises      [* -> 1.2.0.1]
- ps            [* -> 1.7.5]
- purrr         [* -> 1.0.1]
- R6            [* -> 2.5.1]
- rappdirs      [* -> 0.3.3]
- rcmdcheck     [* -> 1.4.0]
- Rcpp          [* -> 1.0.11]
- rematch2      [* -> 2.1.2]
- remotes       [* -> 2.4.2.1]
- rlang         [* -> 1.1.1]
- rmarkdown     [* -> 2.23]
- rprojroot     [* -> 2.0.3]
- rstudioapi    [* -> 0.15.0]
- rversions     [* -> 2.1.2]
- sass          [* -> 0.4.7]
- sessioninfo   [* -> 1.2.2]
- shiny         [* -> 1.7.4.1]
- sourcetools   [* -> 0.1.7-1]
- sys           [* -> 3.4.2]
- systemfonts   [* -> 1.0.4]
- testthat      [* -> 3.1.10]
- textshaping   [* -> 0.3.6]
- tibble        [* -> 3.2.1]
- tinytex       [* -> 0.45]
- urlchecker    [* -> 1.0.1]
- usethis       [* -> 2.2.2]
- utf8          [* -> 1.2.3]
- vctrs         [* -> 0.6.3]
- waldo         [* -> 0.5.1]
- whisker       [* -> 0.4.1]
- withr         [* -> 2.5.0]
- xfun          [* -> 0.39]
- xml2          [* -> 1.3.5]
- xopen         [* -> 1.0.0]
- xtable        [* -> 1.8-4]
- yaml          [* -> 2.3.7]
- zip           [* -> 2.3.0]

# Downloading packages -------------------------------------------------------
- Querying repositories for available source packages ... Done!

- Downloading R6 from RSPM ...                  OK [80.5 Kb in 0.15s]
- Downloading Rcpp from RSPM ...                OK [2 Mb in 0.15s]
- Downloading askpass from RSPM ...             OK [23.3 Kb in 0.14s]
- Downloading sys from RSPM ...                 OK [38.5 Kb in 0.74s]
- Downloading base64enc from RSPM ...           OK [38.2 Kb in 0.43s]
- Downloading brew from RSPM ...                OK [74.5 Kb in 0.45s]
- Downloading brio from RSPM ...                OK [43.7 Kb in 0.45s]
- Downloading bslib from RSPM ...               OK [4.7 Mb in 0.18s]
- Downloading cachem from RSPM ...              OK [64.6 Kb in 0.15s]
- Downloading rlang from RSPM ...               OK [1.5 Mb in 0.15s]
- Downloading fastmap from RSPM ...             OK [60.6 Kb in 0.14s]
- Downloading htmltools from RSPM ...           OK [335.1 Kb in 0.16s]
- Downloading digest from RSPM ...              OK [203.5 Kb in 0.18s]
- Downloading ellipsis from RSPM ...            OK [39.3 Kb in 0.15s]
- Downloading jquerylib from RSPM ...           OK [514.1 Kb in 0.17s]
- Downloading jsonlite from RSPM ...            OK [1 Mb in 0.15s]
- Downloading memoise from RSPM ...             OK [45.7 Kb in 0.16s]
- Downloading mime from RSPM ...                OK [36.3 Kb in 0.16s]
- Downloading sass from RSPM ...                OK [2.3 Mb in 0.16s]
- Downloading fs from RSPM ...                  OK [277.9 Kb in 0.15s]
- Downloading rappdirs from RSPM ...            OK [46.5 Kb in 0.15s]
- Downloading callr from RSPM ...               OK [416.2 Kb in 0.23s]
- Downloading processx from RSPM ...            OK [442.3 Kb in 0.14s]
- Downloading ps from RSPM ...                  OK [377.2 Kb in 0.17s]
- Downloading cli from RSPM ...                 OK [1.2 Mb in 0.13s]
- Downloading clipr from RSPM ...               OK [49.2 Kb in 0.2s]
- Downloading commonmark from RSPM ...          OK [140.9 Kb in 0.18s]
- Downloading cpp11 from RSPM ...               OK [291.8 Kb in 0.18s]
- Downloading crayon from RSPM ...              OK [154.4 Kb in 0.14s]
- Downloading credentials from RSPM ...         OK [168 Kb in 0.18s]
- Downloading openssl from RSPM ...             OK [1.2 Mb in 0.19s]
- Downloading curl from RSPM ...                OK [742.8 Kb in 0.19s]
- Downloading desc from RSPM ...                OK [309.6 Kb in 0.19s]
- Downloading rprojroot from RSPM ...           OK [98.6 Kb in 0.15s]
- Downloading devtools from CRAN ...            OK [365.9 Kb in 0.45s]
- Downloading lifecycle from RSPM ...           OK [119.7 Kb in 0.12s]
- Downloading glue from RSPM ...                OK [153.5 Kb in 0.17s]
- Downloading miniUI from RSPM ...              OK [33.3 Kb in 0.15s]
- Downloading shiny from RSPM ...               OK [4.1 Mb in 0.22s]
- Downloading httpuv from RSPM ...              OK [583.1 Kb in 0.19s]
- Downloading promises from RSPM ...            OK [1.5 Mb in 0.21s]
- Downloading later from RSPM ...               OK [130.7 Kb in 0.15s]
- Downloading magrittr from RSPM ...            OK [229.5 Kb in 0.18s]
- Downloading xtable from RSPM ...              OK [683.7 Kb in 0.18s]
- Downloading fontawesome from RSPM ...         OK [1.3 Mb in 0.16s]
- Downloading sourcetools from RSPM ...         OK [45.8 Kb in 0.15s]
- Downloading withr from RSPM ...               OK [220.2 Kb in 0.13s]
- Downloading pkgbuild from RSPM ...            OK [186.2 Kb in 0.13s]
- Downloading prettyunits from RSPM ...         OK [33.6 Kb in 0.16s]
- Downloading pkgdown from RSPM ...             OK [717.2 Kb in 0.14s]
- Downloading downlit from RSPM ...             OK [108.5 Kb in 0.17s]
- Downloading evaluate from RSPM ...            OK [78.7 Kb in 0.17s]
- Downloading fansi from RSPM ...               OK [294 Kb in 0.2s]
- Downloading vctrs from RSPM ...               OK [1.2 Mb in 0.15s]
- Downloading yaml from RSPM ...                OK [108.6 Kb in 0.15s]
- Downloading httr from RSPM ...                OK [480.4 Kb in 0.14s]
- Downloading purrr from RSPM ...               OK [467.2 Kb in 0.13s]
- Downloading ragg from CRAN ...                OK [417.8 Kb in 0.4s]
- Downloading systemfonts from RSPM ...         OK [270.5 Kb in 0.14s]
- Downloading textshaping from RSPM ...         OK [113.8 Kb in 0.17s]
- Downloading rmarkdown from RSPM ...           OK [2.5 Mb in 0.18s]
- Downloading knitr from RSPM ...               OK [1.4 Mb in 0.14s]
- Downloading highr from RSPM ...               OK [37.9 Kb in 0.16s]
- Downloading xfun from RSPM ...                OK [402.7 Kb in 0.15s]
- Downloading stringr from CRAN ...             OK [171.6 Kb in 0.27s]
- Downloading stringi from CRAN ...             OK [7.3 Mb in 1.5s]
- Downloading tinytex from RSPM ...             OK [129.5 Kb in 0.11s]
- Downloading tibble from RSPM ...              OK [656.1 Kb in 0.13s]
- Downloading pillar from RSPM ...              OK [627.6 Kb in 0.14s]
- Downloading utf8 from RSPM ...                OK [142 Kb in 0.087s]
- Downloading pkgconfig from RSPM ...           OK [17 Kb in 0.097s]
- Downloading whisker from RSPM ...             OK [64.5 Kb in 0.11s]
- Downloading xml2 from RSPM ...                OK [220.4 Kb in 0.14s]
- Downloading pkgload from RSPM ...             OK [171.5 Kb in 0.1s]
- Downloading profvis from CRAN ...             OK [145.5 Kb in 0.19s]
- Downloading htmlwidgets from RSPM ...         OK [793.1 Kb in 0.11s]
- Downloading rcmdcheck from RSPM ...           OK [164.6 Kb in 0.13s]
- Downloading sessioninfo from RSPM ...         OK [179.7 Kb in 0.14s]
- Downloading xopen from RSPM ...               OK [21.7 Kb in 0.093s]
- Downloading remotes from RSPM ...             OK [389.2 Kb in 0.34s]
- Downloading roxygen2 from CRAN ...            OK [272.9 Kb in 0.23s]
- Downloading rversions from RSPM ...           OK [62.9 Kb in 0.13s]
- Downloading testthat from RSPM ...            OK [1.8 Mb in 0.12s]
- Downloading praise from RSPM ...              OK [15.6 Kb in 0.21s]
- Downloading waldo from RSPM ...               OK [100.5 Kb in 0.1s]
- Downloading diffobj from RSPM ...             OK [983.9 Kb in 0.17s]
- Downloading rematch2 from RSPM ...            OK [43.2 Kb in 0.12s]
- Downloading urlchecker from RSPM ...          OK [32.9 Kb in 0.12s]
- Downloading usethis from RSPM ...             OK [847.7 Kb in 0.14s]
- Downloading gert from RSPM ...                OK [2.3 Mb in 0.11s]
- Downloading rstudioapi from RSPM ...          OK [287.3 Kb in 0.11s]
- Downloading zip from RSPM ...                 OK [621.5 Kb in 0.13s]
- Downloading gh from RSPM ...                  OK [98.4 Kb in 0.11s]
- Downloading gitcreds from RSPM ...            OK [93.3 Kb in 0.12s]
- Downloading httr2 from RSPM ...               OK [369.3 Kb in 0.13s]
- Downloading ini from RSPM ...                 OK [12.8 Kb in 0.16s]

# Installing packages --------------------------------------------------------

- Installing R6 ...                             OK [installed binary and cached in 0.63s]
- Installing Rcpp ...                           OK [installed binary and cached in 1.7s]
- Installing sys ...                            OK [installed binary and cached in 0.68s]
- Installing askpass ...                        OK [installed binary and cached in 0.67s]
- Installing base64enc ...                      OK [installed binary and cached in 0.77s]
- Installing brew ...                           OK [installed binary and cached in 0.84s]
- Installing brio ...                           OK [installed binary and cached in 0.7s]
- Installing rlang ...                          OK [installed binary and cached in 1.0s]
- Installing fastmap ...                        OK [installed binary and cached in 0.75s]
- Installing cachem ...                         OK [installed binary and cached in 0.72s]
- Installing digest ...                         OK [installed binary and cached in 0.66s]
- Installing ellipsis ...                       OK [installed binary and cached in 0.91s]
- Installing htmltools ...                      OK [installed binary and cached in 0.81s]
- Installing jquerylib ...                      OK [installed binary and cached in 0.99s]
- Installing jsonlite ...                       OK [installed binary and cached in 0.89s]
- Installing memoise ...                        OK [installed binary and cached in 0.76s]
- Installing mime ...                           OK [installed binary and cached in 0.64s]
- Installing fs ...                             OK [installed binary and cached in 0.78s]
- Installing rappdirs ...                       OK [installed binary and cached in 0.67s]
- Installing sass ...                           OK [installed binary and cached in 1.2s]
- Installing bslib ...                          OK [installed binary and cached in 2.0s]
- Installing ps ...                             OK [installed binary and cached in 0.9s]
- Installing processx ...                       OK [installed binary and cached in 0.82s]
- Installing callr ...                          OK [installed binary and cached in 0.89s]
- Installing cli ...                            OK [installed binary and cached in 1.0s]
- Installing clipr ...                          OK [installed binary and cached in 0.69s]
- Installing commonmark ...                     OK [installed binary and cached in 0.72s]
- Installing cpp11 ...                          OK [installed binary and cached in 0.75s]
- Installing crayon ...                         OK [installed binary and cached in 0.76s]
- Installing openssl ...                        OK [installed binary and cached in 0.96s]
- Installing curl ...                           OK [installed binary and cached in 0.9s]
- Installing credentials ...                    OK [installed binary and cached in 0.83s]
- Installing rprojroot ...                      OK [installed binary and cached in 0.68s]
- Installing desc ...                           OK [installed binary and cached in 0.78s]
- Installing glue ...                           OK [installed binary and cached in 0.72s]
- Installing lifecycle ...                      OK [installed binary and cached in 0.92s]
- Installing later ...                          OK [installed binary and cached in 0.97s]
- Installing magrittr ...                       OK [installed binary and cached in 0.78s]
- Installing promises ...                       OK [installed binary and cached in 1.1s]
- Installing httpuv ...                         OK [installed binary and cached in 1.2s]
- Installing xtable ...                         OK [installed binary and cached in 0.88s]
- Installing fontawesome ...                    OK [installed binary and cached in 1.1s]
- Installing sourcetools ...                    OK [installed binary and cached in 0.91s]
- Installing withr ...                          OK [installed binary and cached in 0.75s]
- Installing shiny ...                          OK [installed binary and cached in 2.1s]
- Installing miniUI ...                         OK [installed binary and cached in 1.1s]
- Installing prettyunits ...                    OK [installed binary and cached in 0.8s]
- Installing pkgbuild ...                       OK [installed binary and cached in 0.9s]
- Installing evaluate ...                       OK [installed binary and cached in 0.69s]
- Installing fansi ...                          OK [installed binary and cached in 0.79s]
- Installing vctrs ...                          OK [installed binary and cached in 1.1s]
- Installing yaml ...                           OK [installed binary and cached in 0.85s]
- Installing downlit ...                        OK [installed binary and cached in 0.93s]
- Installing httr ...                           OK [installed binary and cached in 0.73s]
- Installing purrr ...                          OK [installed binary and cached in 1.2s]
- Installing systemfonts ...                    OK [installed binary and cached in 0.71s]
- Installing textshaping ...                    OK [installed binary and cached in 0.75s]
- Installing ragg ...                           OK [built from source and cached in 1.5m]
- Installing xfun ...                           OK [installed binary and cached in 0.75s]
- Installing highr ...                          OK [installed binary and cached in 0.73s]
- Installing knitr ...                          OK [installed binary and cached in 1.1s]
- Installing stringi ...                        OK [built from source and cached in 1.5m]
- Installing stringr ...                        OK [built from source and cached in 3.9s]
- Installing tinytex ...                        OK [installed binary and cached in 0.64s]
- Installing rmarkdown ...                      OK [installed binary and cached in 1.6s]
- Installing utf8 ...                           OK [installed binary and cached in 0.69s]
- Installing pillar ...                         OK [installed binary and cached in 1.3s]
- Installing pkgconfig ...                      OK [installed binary and cached in 0.74s]
- Installing tibble ...                         OK [installed binary and cached in 1.1s]
- Installing whisker ...                        OK [installed binary and cached in 0.68s]
- Installing xml2 ...                           OK [installed binary and cached in 0.7s]
- Installing pkgdown ...                        OK [installed binary and cached in 1.1s]
- Installing pkgload ...                        OK [installed binary and cached in 1.2s]
- Installing htmlwidgets ...                    OK [installed binary and cached in 1.2s]
- Installing profvis ...                        OK [built from source and cached in 3.6s]
- Installing sessioninfo ...                    OK [installed binary and cached in 0.74s]
- Installing xopen ...                          OK [installed binary and cached in 0.69s]
- Installing rcmdcheck ...                      OK [installed binary and cached in 0.78s]
- Installing remotes ...                        OK [installed binary and cached in 0.74s]
- Installing roxygen2 ...                       OK [built from source and cached in 15s]
- Installing rversions ...                      OK [installed binary and cached in 0.72s]
- Installing praise ...                         OK [installed binary and cached in 0.68s]
- Installing diffobj ...                        OK [installed binary and cached in 0.99s]
- Installing rematch2 ...                       OK [installed binary and cached in 1.2s]
- Installing waldo ...                          OK [installed binary and cached in 1.0s]
- Installing testthat ...                       OK [installed binary and cached in 1.1s]
- Installing urlchecker ...                     OK [installed binary and cached in 0.79s]
- Installing rstudioapi ...                     OK [installed binary and cached in 0.76s]
- Installing zip ...                            OK [installed binary and cached in 0.76s]
- Installing gert ...                           OK [installed binary and cached in 1.3s]
- Installing gitcreds ...                       OK [installed binary and cached in 0.72s]
- Installing httr2 ...                          OK [installed binary and cached in 0.9s]
- Installing ini ...                            OK [installed binary and cached in 0.69s]
- Installing gh ...                             OK [installed binary and cached in 0.78s]
- Installing usethis ...                        OK [installed binary and cached in 1.1s]
- Installing devtools ...                       OK [built from source and cached in 7.2s]

Warning message:
renv took longer than expected (20 seconds) to activate the sandbox.

The sandbox can be disabled by setting:

    RENV_CONFIG_SANDBOX_ENABLED = FALSE

within an appropriate start-up .Renviron file.

See `?renv::config` for more details.

Note For some reason the packages are now installed as soon as I start the first R session with R, while before I had to call renv::restore().

Timing

tschaffter commented 11 months ago

Conclusion

After switching to Ubuntu, all the packages used in the OC API client for R could be installed from binaries. This further reduces the installation time to a total of 2 minutes and 15 seconds in my devcontainer.