-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Milestone
Description
Wish
Add support for launching Rscript
via a Linux container, e.g.
## Call batchtools inside container
module load apptainer/latest
export APPTAINER_BINDPATH="/run/munge,/var/run/munge,/etc/slurm,/var/spool/slurm/slurmd/conf-cache/slurm.conf,$APPTAINER_BINDPATH"
apptainer exec /modules/admin-resources/ood-dev/unity-r_4.4.0.sif Rscript --no-restore --quiet --no-save -e 'batchtools::doJobCollection("<%= uri %>")'
Source: mlr-org/batchtools#314 (comment)
Idea
- Add support for specifying how
Rscript
is launched, e.g.
plan(batchtools_slurm, resources = list(rscript = c("/modules/admin-resources/ood-dev/unity-r_4.4.0.sif", '--bind="/run/munge,/var/run/munge,/etc/slurm,/var/spool/slurm/slurmd/conf-cache/slurm.conf,$APPTAINER_BINDPATH"', "Rscript", "--no-restore", "--quiet", "--no-save"))
This would then become the following in the rendered job script:
/modules/admin-resources/ood-dev/unity-r_4.4.0.sif --bind="/run/munge,/var/run/munge,/etc/slurm,/var/spool/slurm/slurmd/conf-cache/slurm.conf,$APPTAINER_BINDPATH" Rscript -e 'batchtools::doJobCollection("<%= uri %>")'
- Add support for specifying
Rscript
options when launching the batchtools job (inspired by https://parallelly.futureverse.org/reference/makeClusterPSOCK.html), e.g.
plan(batchtools_slurm, resources = list(rscript_args = c("--no-restore", "--quiet", "--no-save"))
This would then become the following in the rendered job script:
Rscript --no-restore --quiet --no-save -e 'batchtools::doJobCollection("<%= uri %>")'
- Add support for setting environment variables, e.g.
plan(batchtools_slurm, resources = list(rscript = c("/modules/admin-resources/ood-dev/unity-r_4.4.0.sif", "Rscript"), envs = c(APPTAINER_BINDPATH = "/run/munge,/var/run/munge,/etc/slurm,/var/spool/slurm/slurmd/conf-cache/slurm.conf,$APPTAINER_BINDPATH"))
export APPTAINER_BINDPATH="/run/munge,/var/run/munge,/etc/slurm,/var/spool/slurm/slurmd/conf-cache/slurm.conf,$APPTAINER_BINDPATH"
/modules/admin-resources/ood-dev/unity-r_4.4.0.sif Rscript -e 'batchtools::doJobCollection("<%= uri %>")'
Metadata
Metadata
Assignees
Labels
No labels