-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are versioned rocker images always guaranteed to contain the same R package versions? #201
Comments
@myoung3 Apologies for the confusion. Non-current versions (i.e. tags < 4.1.0 at this time) are frozen, precisely as you say. It is true that since R 4.0.0 we have moved to RStudio Package Manager (RSPM) instead of MRAN, but RSPM provides version-locked snapshots of CRAN in much the same way, e.g. https://github.com/rocker-org/rocker-versioned2/blob/master/stacks/core-4.0.5.json#L15 (though with the added benefit that we get binary installs for Ubuntu this way). RSPM snapshots are a few times a week instead of daily, so we get the closest version that was still built with the locked version of R. The version of RStudio follows a similar policy, rolling in the current/latest tag and then frozen there-after when that tag is no longer latest. Meanwhile, system libraries (i.e. from apt-get) all come from the Ubuntu upstream LTS distribution (as you probably know, these are effectively frozen on release, though they receive security updates thereafter). We avoid introducing PPAs or rolling-version apt sources, which ensures a stable and predictable set of libraries and compilers (importantly, this also ensures that Rocker compilers and libs match those used by RStudio's RSPM in building the binary images -- there are actually a few special cases where RSPM uses a PPA source, and we seek to match that for compatibility). Recommendations for users really depend on the user. The simplest thing is to rely on a frozen version -- because we are setting RSPM lock by setting the default CRAN mirror, any further use of However, more advanced users might prefer setting a different snapshot date, i.e. locking to the date their analysis was published, rather than locking to the time of an R release. This is easily done by re-defining the environmental variable, CRAN, to the appropriate date. Other users may prefer to use Docker with packrat or renv, which allows a user to preserve an arbitrary collection of packages, i.e. including older and newer versions of different packages that did not all coexist on CRAN at the same time. PRs to documentation are most welcome! We tried to describe most of this in some detail in our R-Journal pub, https://doi.org/10.32614/RJ-2017-065. Though that pre-dates the move to RSPM & Ubuntu-LTS images, we have tried to preserve the core principles. (It also pre-dates the introduction of CUDA-based images, which add a whole 'nother wrinkle because they are sensitive to kernel driver versions external to the container)! |
Thanks @cboettig! I've written up a draft of what could go in the documentation (see below). In writing this up, I've made a couple of discoveries:
Here's my draft of what could go in the documentation. Let me know what you think:
|
@myoung3 Hi, thanks for working on this. It would be nice to have an explanation in the README of this repository.
A while ago, some scripts would install packages from the rocker-versioned2/scripts/install_R.sh Lines 134 to 135 in 917f7e5
|
right so I guess strictly speaking CRAN is an environmental variable, just not one that's used directly by R. I can clarify this in the text. I should also make it more clear that the name of the option is "repos" which is a named vector containing an element named "CRAN" |
Yes it is simply "overloaded" which may look confusing at first. The |
@myoung3 The README and wiki have been updated significantly, and while there is room to add more detail on how to make changes to CRAN, etc., I think the basic instructions are in place. |
I think the wiki page (https://github.com/rocker-org/rocker-versioned2/wiki/Versions) solved this issue. |
I was previously under the impression that the most recent version-tagged rocker image (e.g. currently geospatial:4.1.0) is not stable with respect to R package versions. I got this (mistaken?) idea from this quote:
I was interpreting this quote to mean that the most recent version-tagged rocker image (e.g. 4.1.0) might have its installed R package versions change between the day 4.1.0 was released on rocker through the day the next version is released on rocker (i.e. 4.1.1) because the built-in MRAN date stored in 4.1.0 can change as 4.1.0 is updated during that period.
I now realize that rocker-versioned2 no longer uses MRAN so that quote doesn't even apply anymore. Nevertheless, I'm still uncertain of how package version freezing/pinning works for the versioned images. It would be great if there were documentation on this (maybe in the readme?). Some documentation on the following specific topics would be great:
devtools::install_version
? Or some other approach?)Posting this issue on @eddelbuettel's recommendation after I said some things about rocker on twitter that made it apparent I was confused about how this all worked.
Thanks!
The text was updated successfully, but these errors were encountered: