Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion batchspawner/batchspawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,11 @@ class SlurmSpawner(UserEnvMixin,BatchSpawnerRegexStates):
help="QoS name to submit job to resource manager"
).tag(config=True)

req_srun = Unicode('srun',
help="Job step wrapper, default 'srun'. Set to '' you do not want "
"to run in job step (affects environment handling)"
).tag(config=True)

batch_script = Unicode("""#!/bin/bash
#SBATCH --output={{homedir}}/jupyterhub_slurmspawner_%j.log
#SBATCH --job-name=spawner-jupyterhub
Expand All @@ -528,7 +533,7 @@ class SlurmSpawner(UserEnvMixin,BatchSpawnerRegexStates):
trap 'echo SIGTERM received' TERM
{{prologue}}
which jupyterhub-singleuser
srun {{cmd}}
{% if srun %}{{srun}} {% endif %}{{cmd}}
echo "jupyterhub-singleuser ended gracefully"
{{epilogue}}
""").tag(config=True)
Expand Down