/rocker-versioned2

Primary LanguageShellGNU General Public License v2.0GPL-2.0

license Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

Visit rocker-project.org for more about available Rocker images, configuration, and use.

Version-stable Rocker images for R >= 4.0.0

For R versions >= 4.0.0, we have implemented a new build system and image architecture under this repository.

For images with R <= 3.6.3, please see the rocker-versioned repository, or the shiny, geospatial, and binder repositories for those images, now all consolidated here for R >= 4.0.0.

Instructions for image usage largely follows documentation in the above repositories, except where noted below.

image description size pull
r-ver Version-stable base R & src build tools
rstudio Adds rstudio
tidyverse Adds tidyverse & devtools
verse Adds tex & publishing-related packages
geospatial Adds geospatial packages on top of 'verse'
shiny Adds shiny server on top of 'r-ver'
shiny-verse Adds tidyverse packages on top of 'shiny'
binder Adds requirements to 'geospatial' to run repositories on mybinder.org
ml Adds python and Tensorflow to 'tidyverse'
ml-verse Adds python and Tensorflow to 'verse'

Notes on new architecture for R >= 4.0.0

  • Images are now based on Ubuntu LTS releases rather than Debian and system libraries are tied to the Ubuntu version. Images will use the most recent LTS available at the time when the corresponding R version was released. Thus all 4.0.0 images are based on Ubuntu 20.04.
  • We use the RStudio Package Manager (RSPM) as our default CRAN mirror. RSPM serves compiled Linux binaries of R packages and greatly speeds up package installs.
  • Several images, r-ver, and new experimental ml and ml-verse are now available with CUDA drivers and libraries installed and preconfigured for use on machines with NVIDIA GPUs. These are available under tags 4.X.X-cudaX.X, with currently only CUDA 10.1 available pre-built.
  • We no longer support ADD= runtime triggers for installing Shiny or similar modules. See below for how to extend images to include custom extensions.
  • Shiny images, like RStudio images, now manage processes via the S6 supervisor system allowing containers to manage multiple background processes gracefully.

Modifying and extending images in the new architecture

In our new build system, pre-built images are defined with JSON files under the stacks/ folder in this repository. Each file defines a series of related images. The .R files in the base folder use these to create the actual Dockerfiles under dockerfiles and images are built using the Makefile. These Dockerfiles are server as examples of how to build your own custom images.

Importantly, we have moved as much of the detailed install logic out of Dockerfiles and into standalone scripts, or "modules", under the scripts directory. These files are available in all Docker images, under a top-level /rocker_scripts directory. This allows users to extend images by selecting additional modules to install on top of any pre-built images. For instance, if one wishes to install Shiny Server and Binder dependencies on top of a base of rstudio:3.6.3, one could write a simple Dockerfile as follows:

FROM rstudio/r-ver:3.6.3

RUN /rocker_scripts/install_shiny_server.sh

Install scripts can generally take a version as a first argument or ingest an environment variable to specify the version to install. So to install fixed versions, one can use either of the following syntaxes:

ENV SHINY_SERVER_VERSION 1.5.14.948
RUN /rocker_scripts/install_shiny_server.sh

RUN /rocker_scripts/install_shiny_server.sh 1.5.14.948

In general scripts default to "latest" or the most recent version.