Skip to content
/ rsi Public

Containerised R source installation. Please submit Pull Requests to the GitLab repository. Mirror of

License

Notifications You must be signed in to change notification settings

b-data/rsi

Repository files navigation

Containerised R source installation

minimal-readme compliant Project Status: Active – The project has reached a stable, usable state and is being actively developed. Donate using Liberapay

This project is intended for system administrators who want to perform a source installation of R. It is meant for installing official releases of R source code on Debian-based Linux distributions, e.g. Ubuntu, using a docker container.

Table of Contents

Prerequisites

This projects requires an installation of docker and docker compose.

Docker

To install docker, follow the instructions for your platform:

Docker Compose

Debian Packages

To cover the runtime dependencies on a headless server, the latest version of r-base-dev (currently 4.4.2) requires the following packages:

dpkg-dev
"${CXX_STDLIB:-g++}${CXX_STDLIB_VERSION:+-}${CXX_STDLIB_VERSION}${CXX_STDLIB:+-dev}"
libc6-dev
make
ca-certificates
"${COMPILER:-gcc}${COMPILER_VERSION:+-}${COMPILER_VERSION}"
gfortran
"${CXX_STDLIB}${CXX_STDLIB:+abi}${CXX_STDLIB_VERSION:+-}${CXX_STDLIB_VERSION}${CXX_STDLIB:+-dev}"
libbz2-dev
'^libcurl[3|4]$'
libdeflate-dev
libicu-dev
'^libjpeg.*-turbo.*-dev$'
liblzma-dev
"${BLAS:-liblapack-dev}"
libpangocairo-1.0-0
libpaper-utils
'^libpcre[2|3]-dev$'
libpng-dev
libreadline-dev
'^libtiff[5|6]$'
pkg-config
unzip
zip
zlib1g

These packages must be available on the host. Therefore, set

  • BLAS to the [LAPACK/]BLAS library set in .env (default: liblapack-dev which depends on libblas-dev).
  • COMPILER to the Compiler set in .env (default: gcc)
  • CXX_STDLIB to the C++ Standard Library set in .env (default: libstdc++)

Tcl/Tk and X11 capabilities

Install the following package dependencies for r-base-dev to gain full Tcl/Tk and X11 capabilities at runtime:

libtcl8.6
libtk8.6
libxss1
libxt6
xauth
xdg-utils

Install

Clone the source code of this project:

git clone https://gitlab.com/b-data/r/rsi.git

Usage

Change directory and make a copy of all sample. files:

cd rsi
git checkout main

for file in sample.*; do cp "$file" "${file#sample.}"; done;

In .env, set IMAGE according to the host's Debian-based Linux distribution (DISTRIBUTION:RELEASE), R_VERSION to the desired version of R (MAJOR.MINOR.PATCH) and PREFIX to the location, where you want the R programs to be installed (default: /opt/local).

If you intend to install multiple versions of R, set SUBDIR to automatically create separate subdirectories for each version (e.g. /R/${R_VERSION}).

Then, create and start container rsi using options --build (Build images before starting containers) and -V (Recreate anonymous volumes instead of retrieving data from the previous containers):

docker-compose up --build -V

Do not forget to add PREFIX[/SUBDIR]/bin to PATH when using a PREFIX within /opt.

References

patches

scripts

Contributing

PRs accepted. Please submit to the GitLab repository.

This project follows the Contributor Covenant Code of Conduct.

Support

Community support: Open a new discussion here.

Commercial support: Contact b-data by email.

License

Copyright © 2021 b-data GmbH

Distributed under the terms of the MIT License.