create_config: Backend configuration for containerisation

Description Usage Arguments Examples

View source: R/config_create.R

Description

It is advised to define the "BABELWHALE_BACKEND" environment variable as "docker" or "singularity".

When using singularity, also define the "SINGULARITY_CACHEDIR" environment variable, which is the folder where the singularity images will be cached. Each TI method will require about 1GB of space.

Alternatively, you can create a config and save it using set_default_config().

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
create_config(
  backend = get_env_or_null("BABELWHALE_BACKEND") %||% detect_backend()
)

create_docker_config(environment_variables = character(0))

create_singularity_config(
  cache_dir = get_env_or_null("SINGULARITY_CACHEDIR") %||% ".singularity/",
  environment_variables = character(0)
)

get_default_config()

set_default_config(config, permanent = TRUE)

Arguments

backend

Which backend to use. Can be either "docker" or "singularity".

environment_variables

A character vector of environment variables. Format: c("ENVVAR=VALUE").

cache_dir

A folder in which to store the singularity images. A container typically requires 100MB to 2GB.

config

A config to save as default.

permanent

Whether or not to save the config file permanently

Examples

1
2
3
4
5
6
7
8
config <- create_docker_config()
set_default_config(config, permanent = FALSE)

config <- create_singularity_config(
  # ideally, this would be set to a non-temporary directory
  cache_dir = tempdir()
)
set_default_config(config, permanent = FALSE)

babelwhale documentation built on June 2, 2021, 5:07 p.m.