From 9fac0283af7a61c43110ea4d7d06aa264a4b451d Mon Sep 17 00:00:00 2001 From: btraven <128150520+btraven00@users.noreply.github.com> Date: Mon, 17 Mar 2025 16:20:31 +0100 Subject: [PATCH 1/6] docs: use the public repo URI --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a75c594a..89d7c057 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ A clustering example for omnibenchmark # How to run 1. Install omnibenchmark using [our tutorial](https://omnibenchmark.org/tutorial/) -2. Clone the benchmark definition / this repository with `git clone git@github.com:omnibenchmark/clustering_example.git` -3. Move to the cloned repository `cd clustering_example` +2. Clone the benchmark definition / this repository with `git clone https://github.com/omnibenchmark/clustering_example` +3. Move into the cloned folder: `cd clustering_example` 4. Run locally, somewhat in parallel `ob run benchmark -b CLUSTERING.YAML --local --threads 6`. Choose `Clustering.yml` specification based on whether running it with conda, easybuild, apptainer, etc. [More details about the available backends](https://github.com/omnibenchmark/clustering_example/blob/main/envs/README.md). # Clustbench attribution From d0900abc530aca7c27c608725e3269f5661525ca Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 18 Mar 2025 13:02:37 +0100 Subject: [PATCH 2/6] chore: add convenience target to build singularity env - make script executable - use /bin/sh instead of /bin/bash - add top-level Makefile to prepare env --- Makefile | 2 ++ envs/build_singularity.sh | 14 +++++--------- 2 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 Makefile mode change 100644 => 100755 envs/build_singularity.sh diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..1e56cb28 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +prepare_apptainer_env: + cd envs && ./build_singularity.sh diff --git a/envs/build_singularity.sh b/envs/build_singularity.sh old mode 100644 new mode 100755 index 86e053fd..c0c3d936 --- a/envs/build_singularity.sh +++ b/envs/build_singularity.sh @@ -1,9 +1,5 @@ -#!/bin/bash - -sudo singularity build sklearn.sif sklearn_singularity.def - -sudo singularity build clustbench.sif clustbench_singularity.def - -sudo singularity build r.sif r_singularity.def - -sudo singularity build fcps.sif fcps_singularity.def +#!/bin/sh +singularity build sklearn.sif sklearn_singularity.def +singularity build clustbench.sif clustbench_singularity.def +singularity build r.sif r_singularity.def +singularity build fcps.sif fcps_singularity.def From b92e030ee22f85b80bf886ab1e4dcd1e4e079622 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 18 Mar 2025 13:59:05 +0100 Subject: [PATCH 3/6] feat: parametrize num threads on the makefile --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 1e56cb28..3c58e2f4 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,10 @@ +MAX_THREADS ?= 30 +OB_CMD="ob run benchmark -k --local" prepare_apptainer_env: cd envs && ./build_singularity.sh +run_with_apptainer_backend: + ${OB_CMD} -b Clustering_singularity.yml --threads ${MAX_THREADS} + mv out out_apptainer +run_with_conda_backend: + ${OB_CMD} -b Clustering_conda.yml --threads ${MAX_THREADS} + mv out out_conda From b91db3121aa07a370383e67b76e936eb52143e22 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 18 Mar 2025 14:02:21 +0100 Subject: [PATCH 4/6] chore: ignore common temporary outputs and image build artifacts --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..4d38534b --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# image build artifacts +envs/*.sif + +# snakemake +snakemake.log +.snakemake/ + +# vim swaps +*.swp +*.swo From 9af630e359c0b279f28a4635837c96b337be532e Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 18 Mar 2025 13:59:05 +0100 Subject: [PATCH 5/6] feat: parametrize num threads on the makefile --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3c58e2f4..6883fa0e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ MAX_THREADS ?= 30 -OB_CMD="ob run benchmark -k --local" +# by default, we want to run all snakemake rules even if there are failures +OB_CMD=ob run benchmark -k --local prepare_apptainer_env: cd envs && ./build_singularity.sh run_with_apptainer_backend: From 6250da425f7853bae24883d43abfb45f2353ba9a Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 5 May 2025 10:07:36 +0200 Subject: [PATCH 6/6] fix: use --cores, --task-timeout --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6883fa0e..73b33b5f 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ -MAX_THREADS ?= 30 +MAX_CORES ?= 10 # by default, we want to run all snakemake rules even if there are failures -OB_CMD=ob run benchmark -k --local +OB_CMD=ob run benchmark -k --local --task-timeout "4h" prepare_apptainer_env: cd envs && ./build_singularity.sh run_with_apptainer_backend: - ${OB_CMD} -b Clustering_singularity.yml --threads ${MAX_THREADS} + ${OB_CMD} -b Clustering_singularity.yml --cores ${MAX_CORES} mv out out_apptainer run_with_conda_backend: - ${OB_CMD} -b Clustering_conda.yml --threads ${MAX_THREADS} + ${OB_CMD} -b Clustering_conda.yml --cores ${MAX_CORES} mv out out_conda