diff --git a/batchjob.sh b/batchjob.sh index 6bec0d1..ede004d 100644 --- a/batchjob.sh +++ b/batchjob.sh @@ -1,10 +1,5 @@ #!/bin/bash -if [ -d "./logs" ]; then - rm -rf ./logs -fi -mkdir -p ./logs - #SBATCH -J exp_job #SBATCH --ntasks=1 #SBATCH --nodes=1 @@ -28,6 +23,9 @@ if [ -f ml-pipeline-image_latest.sif ]; then fi singularity pull docker://michaelwitte/ml-pipeline-image:latest +echo "Cleaning up the logs directory..." +find ./logs -type f ! -name "slurm-$SLURM_JOB_ID.out" -delete + echo "Starting singularity execution..." # Run the singularity container, bind the current directory to the container's working directory, bind ssh key for git