File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -666,12 +666,12 @@ def get_env(self):
666
666
class SlurmSpawner (UserEnvMixin , BatchSpawnerRegexStates ):
667
667
batch_script = Unicode (
668
668
"""#!/bin/bash
669
- #SBATCH --output={{homedir}}/jupyterhub_slurmspawner_%j.log
670
669
#SBATCH --job-name=spawner-jupyterhub
671
670
#SBATCH --chdir={{homedir}}
672
671
#SBATCH --export={{keepvars}}
673
672
#SBATCH --get-user-env=L
674
- {% if partition %}#SBATCH --partition={{partition}}
673
+ {% if output %}#SBATCH --output={% if not output.startswith('/') %}{{homedir}}/{% endif %}{{output}}
674
+ {% endif %}{% if partition %}#SBATCH --partition={{partition}}
675
675
{% endif %}{% if runtime %}#SBATCH --time={{runtime}}
676
676
{% endif %}{% if memory %}#SBATCH --mem={{memory}}
677
677
{% endif %}{% if gres %}#SBATCH --gres={{gres}}
@@ -717,6 +717,12 @@ class SlurmSpawner(UserEnvMixin, BatchSpawnerRegexStates):
717
717
help = "Additional resources (e.g. GPUs) requested" ,
718
718
).tag (config = True )
719
719
720
+ req_output = Unicode (
721
+ "jupyterhub_slurmspawner_%j.log" ,
722
+ help = "Batch script standard output and standard error filename pattern."
723
+ "Relative filename is considered relative to ``req_homedir``." ,
724
+ ).tag (config = True )
725
+
720
726
# outputs line like "Submitted batch job 209"
721
727
batch_submit_cmd = Unicode ("sbatch --parsable" ).tag (config = True )
722
728
# outputs status and exec node like "RUNNING hostname"
You can’t perform that action at this time.
0 commit comments