From c230aa02d60f4dede87aca342388981a4b9844d0 Mon Sep 17 00:00:00 2001 From: Insang Song Date: Tue, 12 Nov 2024 21:14:59 +0900 Subject: [PATCH] HMS calculation fix - upstream amadeus function was fixed - library argument is populated with dev library locations --- _targets.R | 9 +++++---- invalidate_container.sh | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100755 invalidate_container.sh diff --git a/_targets.R b/_targets.R index eb067ca..9315f7c 100755 --- a/_targets.R +++ b/_targets.R @@ -2,6 +2,9 @@ ############################## BEETHOVEN ############################# ##### Main file controlling the settings, options, and sourcing of targets ##### for the beethoven analysis pipeline. +.libPaths( + c("/mnt/lib-flex", .libPaths()) +) ############################# CONTROLLER ############################# default_controller <- crew::crew_controller_local( @@ -20,10 +23,6 @@ targets::tar_config_set(store = "/opt/_targets") ############################## OPTIONS ############################## -.libPaths( - c("/mnt/lib-flex", .libPaths()) -) - targets::tar_option_set( packages = c( @@ -31,6 +30,8 @@ targets::tar_option_set( "data.table", "sf", "crew", "crew.cluster", "amadeus" ), + # add + library = c("/mnt/lib-flex", .libPaths()), repository = "local", error = "continue", memory = "transient", diff --git a/invalidate_container.sh b/invalidate_container.sh new file mode 100755 index 0000000..0c63854 --- /dev/null +++ b/invalidate_container.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +DEBUG_TARGET=$1 + +#SBATCH --job-name=beethoven +#SBATCH --mail-user=manwareme@nih.gov +#SBATCH --mail-type=END,FAIL +#SBATCH --partition=geo +#SBATCH --ntasks=1 +#SBATCH --mem=100G +#SBATCH --cpus-per-task=50 +#SBATCH --error=/ddn/gs1/home/manwareme/beethoven/beethoven/slurm/beethoven_%j.err +#SBATCH --output=/ddn/gs1/home/manwareme/beethoven/beethoven/slurm/beethoven_%j.out + +# run pipeline in the container +apptainer exec \ + --bind $PWD:/mnt \ + --bind $PWD/inst:/inst \ + --bind /ddn:/input \ + --bind $PWD/_targets:/opt/_targets \ + beethoven_dl_calc.sif \ + Rscript --no-init-file -e "targets::tar_invalidate('$DEBUG_TARGET')" + +# run interactive R session in the container +# apptainer exec --bind $PWD/inst:/inst --bind /ddn/gs1/group/set/Projects/NRT-AP-Model/input:/input --bind $PWD:/mnt beethoven_dl_calc.sif R \ No newline at end of file