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):
666666class SlurmSpawner (UserEnvMixin , BatchSpawnerRegexStates ):
667667 batch_script = Unicode (
668668 """#!/bin/bash
669- #SBATCH --output={{homedir}}/jupyterhub_slurmspawner_%j.log
670669#SBATCH --job-name=spawner-jupyterhub
671670#SBATCH --chdir={{homedir}}
672671#SBATCH --export={{keepvars}}
673672#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}}
675675{% endif %}{% if runtime %}#SBATCH --time={{runtime}}
676676{% endif %}{% if memory %}#SBATCH --mem={{memory}}
677677{% endif %}{% if gres %}#SBATCH --gres={{gres}}
@@ -717,6 +717,12 @@ class SlurmSpawner(UserEnvMixin, BatchSpawnerRegexStates):
717717 help = "Additional resources (e.g. GPUs) requested" ,
718718 ).tag (config = True )
719719
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+
720726 # outputs line like "Submitted batch job 209"
721727 batch_submit_cmd = Unicode ("sbatch --parsable" ).tag (config = True )
722728 # outputs status and exec node like "RUNNING hostname"
You can’t perform that action at this time.
0 commit comments