kube_install: Install and create binaries for packages parallely using a...

View source: R/kube_install.R

kube_installR Documentation

Install and create binaries for packages parallely using a kubernetes cluster.

Description

Install packages and create binaries using a BiocParallelParam for a specific bioconductor docker image. The kube_install function can be scaled to a large cluster to reduce times even further (in theory). Please note that this command will charge your google billing account, beware of the charges.

Usage

kube_install(lib_path, bin_path, logs_path, deps, BPPARAM = NULL)

Arguments

lib_path

character() path where R package libraries are stored.

bin_path

character() path where R package binaries are stored.

logs_path

character() path where R package binary build logs are stored.

deps

package dependecy graph as computed by '.pkg_dependencies()'.

BPPARAM

A 'BiocParallelParam' object specifying how each level of the dependency graph will be parallelized. Use 'SerialParam()' for debugging; 'RedisParam()' for use in kubernetes.

Examples

## Not run: 

## First method:
## Run with a pre-existing bucket with some packages.
## This will update only the new packages
binary_repo <- "anvil-rstudio-bioconductor/0.99/3.11/"
deps <- pkg_dependencies(binary_repo = binary_repo)
kube_install(
    lib_path = "/host/library",
    bin_path = "/host/binaries",
    deps = deps
)

## Second method:
## Create a new google CRAN style bucket and populate with binaries.
gcloud_create_cran_bucket("gs://my-new-binary-bucket",
    "1.0", "3.11", secret = "/home/mysecret.json", public = TRUE)

deps_new <- pkg_dependencies(binary_repo = "my-new-binary-bucket/1.0/3.11")

kube_install(
    workers = 6L,
    lib_path = "/host/library",
    bin_path = "/host/binaries",
    deps = deps_new
)

## End(Not run)


Bioconductor/BiocKubeInstall documentation built on Jan. 26, 2023, 12:35 a.m.