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 @@ -688,12 +688,12 @@ def get_env(self):
688
688
class SlurmSpawner (UserEnvMixin , BatchSpawnerRegexStates ):
689
689
batch_script = Unicode (
690
690
"""#!/bin/bash
691
- #SBATCH --output={{homedir}}/jupyterhub_slurmspawner_%j.log
692
691
#SBATCH --job-name=spawner-jupyterhub
693
692
#SBATCH --chdir={{homedir}}
694
693
#SBATCH --export={{keepvars}}
695
694
#SBATCH --get-user-env=L
696
- {% if partition %}#SBATCH --partition={{partition}}
695
+ {% if output %}#SBATCH --output={% if not output.startswith('/') %}{{homedir}}/{% endif %}{{output}}
696
+ {% endif %}{% if partition %}#SBATCH --partition={{partition}}
697
697
{% endif %}{% if runtime %}#SBATCH --time={{runtime}}
698
698
{% endif %}{% if memory %}#SBATCH --mem={{memory}}
699
699
{% endif %}{% if gres %}#SBATCH --gres={{gres}}
@@ -740,6 +740,12 @@ class SlurmSpawner(UserEnvMixin, BatchSpawnerRegexStates):
740
740
help = "Additional resources (e.g. GPUs) requested" ,
741
741
).tag (config = True )
742
742
743
+ req_output = Unicode (
744
+ "jupyterhub_slurmspawner_%j.log" ,
745
+ help = "Batch script standard output and standard error filename pattern."
746
+ "Relative filename is considered relative to ``req_homedir``." ,
747
+ ).tag (config = True )
748
+
743
749
# outputs line like "Submitted batch job 209"
744
750
batch_submit_cmd = Unicode ("sbatch --parsable" ).tag (config = True )
745
751
# outputs status and exec node like "RUNNING hostname"
You can’t perform that action at this time.
0 commit comments