From 9762e5098722db80e70b076f4b089a4df817027b Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Fri, 2 Feb 2024 18:16:46 +0100 Subject: [PATCH] Support for xvfb-run wrapper --- slate/slate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/slate/slate.py b/slate/slate.py index a717621..5e88607 100644 --- a/slate/slate.py +++ b/slate/slate.py @@ -225,7 +225,10 @@ class Slate(): sh_lines += self.consume(slurmC, 'sh_lines', []) if venv := self.consume(slurmC, 'venv', False): sh_lines += [f'source activate {venv}'] - sh_lines += [f'python3 {python_script} {filename} {name} -t $SLURM_ARRAY_TASK_ID --sweep_id {self.sweep_id}'] + if self.consume(slurmC, 'xvfb', False): + sh_lines += [f'xvfb-run python3 {python_script} {filename} {name} -t $SLURM_ARRAY_TASK_ID --sweep_id {self.sweep_id}'] + else: + sh_lines += [f'python3 {python_script} {filename} {name} -t $SLURM_ARRAY_TASK_ID --sweep_id {self.sweep_id}'] script = "\n".join(sh_lines) num_jobs = self._calc_num_jobs(schedC, num_conv_versions)