diff --git a/.github/workflows/RunChecks.yaml b/.github/workflows/RunChecks.yaml index 05d6cc0..04da01a 100644 --- a/.github/workflows/RunChecks.yaml +++ b/.github/workflows/RunChecks.yaml @@ -54,6 +54,11 @@ jobs: mv ./squeue /usr/local/bin/squeue chmod 755 /usr/local/bin/squeue + gh release download "sbatch/v0.2.0" -R a2-ai-tech-training/slurm-mocks -p "*Linux_x86_64.tar.gz" -D /usr/local/bin/" + tar -xvf /usr/local/bin/sbatch_Linux_x86_64.tar.gz + mv ./sbatch /usr/local/bin/sbatch + chmod 755 /usr/local/bin/sbatch + echo "/usr/local/bin" >> $GITHUB_PATH env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/R/submit-model.R b/R/submit-model.R index ccfdcd0..80f75d7 100644 --- a/R/submit-model.R +++ b/R/submit-model.R @@ -109,6 +109,7 @@ submit_nonmem_model <- template_list ) }) + script_file_path <- file.path(submission_root, sprintf("%s.sh", basename(.mod$absolute_model_path))) if (!dry_run) { @@ -118,7 +119,7 @@ submit_nonmem_model <- brio::write_file(template_script, script_file_path) fs::file_chmod(script_file_path, "0755") } - cmd <- list(cmd = "sbatch", args = script_file_path, template_script = template_script, partition = partition) + cmd <- list(cmd = Sys.which("sbatch"), args = script_file_path, template_script = template_script, partition = partition) if (dry_run) { return(cmd) }