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
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 %>")'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 %>")'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"))exportAPPTAINER_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.sifRscript-e'batchtools::doJobCollection("<%= uri %>")'
Wish
Add support for launching
Rscriptvia a Linux container, e.g.Source: mlr-org/batchtools#314 (comment)
Idea
Rscriptis launched, e.g.This would then become the following in the rendered job script:
Rscriptoptions when launching the batchtools job (inspired by https://parallelly.futureverse.org/reference/makeClusterPSOCK.html), e.g.This would then become the following in the rendered job script: