NASA-IMPACT / NASA-IMPACT/science-support
Test Pak with repo2docker for faster R builds
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
There are a couple of lessons we've learned that could be applied to make repo2docker R builds faster.
- Use pak
- Install binaries whenever possible
This will change how install.R scripts for repo2docker are written, and you want to pass a complete list of all the packages to pak so it can solve the fastest way to install and do things in parallel. pak will either need to be installed in the base repo2docker for R, or every install.R will need
install.packages("pak", repos = sprintf(
"https://r-lib.github.io/p/pak/stable/%s/%s/%s",
.Platform$pkgType,
R.Version()$os,
R.Version()$arch
))
Support for 3rd party repositories is supported
pak::[repo_add](https://pak.r-lib.org/reference/repo_add.html)(rhub = 'https://r-hub.r-universe.dev')
which is important for things like lasR, or pulling binaries from posit's repo.
install.packages(
"lasR",
repos = c("https://r-lidar.r-universe.dev", "https://cloud.r-project.org")
)
We should be able to test all this on our own with existing repo2docker, before upstreaming changes.
Unclear if Science Support or JupyterHub team should lead. cc: @aprilmj
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing install.R scripts and the base repo2docker R setup, then test pak and binary installation with representative package lists. Compare build behavior before and after the experiment, including third-party repositories such as lasR. Done means the approach is validated locally and the required install.R or base-image changes are clear enough to upstream.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, r
- Domain
- build-system, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100