Skip to content

Commit 450957b

Browse files
Tidy up Linux container example [ci skip]
1 parent 214e869 commit 450957b

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

R/batchtools_slurm.R

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,25 @@ print.BatchtoolsSlurmFutureBackend <- function(x, ...) {
109109
#' info <- value(f)
110110
#' print(info)
111111
#'
112-
#' # As above, but run R within the Rocker 'r-base' Linux container.
112+
#' # As above, but run R within the Rocker 'r-base' Linux container;
113+
#' #
114+
#' # mkdir -p ~/lxc
115+
#' # apptainer build ~/lxc/rocker_r-base.sif docker://rocker/r-base
116+
#' #
113117
#' # It assumes that 'future.batchtools' has been installed in the
114-
#' # container already to the below 'R_LIBS_USER' library path.
118+
#' # container already with 'R_LIBS_USER' on host;
119+
#' #
120+
#' # R_LIBS_USER="~/R/rocker-%p-library/%v" \
121+
#' # apptainer exec ~/lxc/rocker_r-base.sif R --quiet
122+
#' # > chooseCRANmirror(ind = 1)
123+
#' # > install.packages("future.batchtools")
124+
#' #
115125
#' plan(future.batchtools::batchtools_slurm, resources = list(
116126
#' time = "00:10:00", mem = "400M",
117127
#' asis = c("--nodes=1", "--ntasks=4", "--partition=freecycle"),
118128
#' modules = c("r", "jags"),
119129
#' details = TRUE,
120-
#' envs = c(R_LIBS_USER="~/R/rocker-%p-library/%v-CBI-gcc13"),
130+
#' envs = c(R_LIBS_USER="~/R/rocker-%p-library/%v"),
121131
#' rscript = c("apptainer", "exec", "~/lxc/rocker_r-base.sif", "Rscript")
122132
#' ))
123133
#'

man/batchtools_slurm.Rd

Lines changed: 13 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)