jsta / r-docker-tutorial

A docker tutorial for reproducible research
http://jsta.github.io/r-docker-tutorial
250 stars 94 forks source link

Consider updated / versioned rocker images #38

Closed cboettig closed 7 years ago

cboettig commented 7 years ago

Hey @BillMills @HeidiSeibold ,

We have a new stack of rocker images, aimed more specifically at reproduciblity that it would be great to get your feedback on, and maybe consider migrating to for these lessons; see README here: https://github.com/rocker-org/rocker-versioned.

Most notable is the use of tags. In Docker, if you do not specify a tag, you're implicitly using the tag :latest, which in the rocker images corresponds to the most recent version of R and R packages. We now have tags specific to R versions, e.g. 3.3.1. In this stack, using the most recent R version as the tag (e.g. 3.3.2 at this time) is the same as asking for :latest, but using an earlier version like 3.3.1 not only locks in the R version, but also installs all R packages using an MRAN snapshot with the date fixed at the last day that version was current (e.g. 2016-10-31 in for 3.3.1). This is also set as the default CRAN repo. This effectively freezes the versions of all packages and should result in a more stable, reproducible build, though it won't have the latest and greatest.

I imagine a workflow in which users still tend to try things out and develop on :latest, but when archiving projects or their own Dockerfiles, would test and use the latest R release version (patch versions of R are released every few months, minor versions 1-2 a year), for greater reproducibility down the road. Thoughts on this?

One other notable change -- we're moving to deprecate rocker/hadleyverse in favor of rocker/tidyverse (which is much smaller and more explicitly defined as just R+RStudio+tidyverse+devtools packages). Another new image, rocker/verse adds LaTeX and a few minor things to tidyverse, corresponding more closely to the old hadleyverse image. If your examples use LaTeX (e.g. via Rmd) it might be good to migrate to verse, otherwise, migrate to tidyverse for a more compact image (423 MB compressed)

HeidiSeibold commented 7 years ago

Sounds like a thing we should do to keep the tutorial up-to-date.

Just to be clear, you suggest to exchange docker run --rm -p 8787:8787 rocker/hadleyverse with docker run --rm -p 8787:8787 rocker/tidyverse:3.3.2 or docker run --rm -p 8787:8787 rocker/verse:3.3.2 ?

cboettig commented 7 years ago

yup!

Though if you want students to be using the latest version of R, you can just leave off the tag:

docker run --rm -p 8787:8787 rocker/verse

and automatically have the latest version. So I think it's really a pedagogical question of whether it's better to show the tag and make the versioning aspect explicit, or omit the tag and make the command a bit simpler to read.

Also leaving off the tag means it will always get the latest version, otherwise you'd have to update the lesson when new R versions are released.

bkatiemills commented 7 years ago

+1 awesome, big fan of version pinning. Thanks @cboettig!

HeidiSeibold commented 7 years ago

Maybe it is best to start with the lastest version and then explain the versioning in lesson 6?

HeidiSeibold commented 7 years ago

I exchanged rocker/hadleyverse with rocker/verse and mention using an explicit version in lesson 06. Do you agree with this?

cboettig commented 7 years ago

:+1: from me

HeidiSeibold commented 7 years ago

Okay, I merged and close this now :)