From 493cf2ed51db2039ebbdb4310bdc5f6b88d6e2d0 Mon Sep 17 00:00:00 2001 From: Lea Vauchier Date: Wed, 29 Nov 2023 18:08:00 +0100 Subject: [PATCH] MALT0: create missing folders --- coclico/malt0/malt0.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/coclico/malt0/malt0.py b/coclico/malt0/malt0.py index 1e47a8c..a288540 100644 --- a/coclico/malt0/malt0.py +++ b/coclico/malt0/malt0.py @@ -44,8 +44,13 @@ class MALT0(Metric): def create_metric_intrinsic_one_job(self, name: str, input: Path, output: Path, is_ref: bool): job_name = f"{self.metric_name}_intrinsic_{name}_{input.stem}" - - occupancy_map_arg = f"--output-occupancy-file /output/occupancy/{input.stem}.tif" if is_ref else "" + occupancy_map_arg = "" + mnx_out = output / "mnx" + mnx_out.mkdir(exist_ok=True, parents=True) + if is_ref: + occ_out = output / "occupancy" + occ_out.mkdir(exist_ok=True, parents=True) + occupancy_map_arg = f"--output-occupancy-file /output/occupancy/{input.stem}.tif" command = f""" docker run -t --rm --userns=host --shm-size=2gb