Customizing the Environment

Whole Tale requires you to declare any software dependencies in a set of simple text files that are used to build a Docker image that is used to run your code.

The text file formats are based on formats supported by repo2docker and, where possible, follow package installation conventions of each language (e.g., requirements.txt for Python, DESCRIPTION for R). In other cases, simple formats are defined (e.g., apt.txt, toolboxes.txt).

Seel also:

Base environment

The base environment is always an Ubuntu “Long Term Support” (LTS) version, often the latest release.

The apt.txt file contains a list of packages that can be installed via apt-get. Entries may have an optional version (e.g., for use with apt-get install <package name>=<version>)

For example:

libblas-dev=3.7.1-4ubuntu1
liblapack-dev=3.7.1-4ubuntu1

See also:

MATLAB

MATLAB support is part of the Whole Tale repo2docker extension and not available in all repo2docker configurations.

MATLAB toolboxes must be declared in a toolboxes.txt file. Each line contains a valid MATLAB product for the selected version.

For a complete list of available packages for each supported version, see https://github.com/whole-tale/matlab-install/blob/main/products/.

For example the following toolboxes.txt wold install the Financial and Statistics and Machine Learning toolboxes.

product.Financial_Toolbox
product.Statistics_and_Machine_Learning_Toolbox

See also:

R/RStudio

R packages may be specified in a DESCRIPTION file or install.R.

For install.R, each line is an install.packages() statement for a given package:

install.packages("ggplot2")
install.packages("reshape2")
install.packages("lmtest")

To configure a specific version, we recommend configuring an MRAN date using the runtime.txt file:

r-2020-10-20

This file contains the MRAN date containing the versions of packages specified in install.R.

Alternatively, you ca use the install_version function in place of install.packages in your install.R file.

require(devtools)
install_version("ggplot2", version = "0.9.1")

For more information see:

Python

Python packages can be specified using requirements.txt, Pipfile/Pipfile.lock, or Conda environment.yaml.

Example requirements.txt:

bokeh==1.4.0
pandas==1.2.4
xlrda==2.0.1

See also:

Other

Non-standard packages can be installed (or arbitrary commands run) using a postBuild script. The start script can be used to run arbitrary code before th user session starts.

See also: