Add explicit cluster name to slurm script
This commit is contained in:
parent
8217d63c41
commit
7792d567f5
2 changed files with 3 additions and 1 deletions
|
@ -28,7 +28,7 @@ echo "The {{job_name}} logs are located in: ${JUPYTER_LOG_DIR}"
|
||||||
trap 'echo SIGTERM received' TERM;
|
trap 'echo SIGTERM received' TERM;
|
||||||
|
|
||||||
{# SLURM config -#}
|
{# SLURM config -#}
|
||||||
scontrol write batch_script ${SLURM_JOB_ID} -;
|
scontrol write batch_script ${SLURM_JOB_ID}{% if cluster %} --cluster={{cluster}}{% endif %} -;
|
||||||
|
|
||||||
{# Micromamba config -#}
|
{# Micromamba config -#}
|
||||||
export MAMBA_EXE={{mamba_exe}};
|
export MAMBA_EXE={{mamba_exe}};
|
||||||
|
|
|
@ -57,6 +57,8 @@ def test_spawner_batch_script(monkeypatch):
|
||||||
assert '#SBATCH --cluster=nautilus' in script
|
assert '#SBATCH --cluster=nautilus' in script
|
||||||
assert '#SBATCH --qos=short' in script
|
assert '#SBATCH --qos=short' in script
|
||||||
|
|
||||||
|
assert 'scontrol write batch_script ${SLURM_JOB_ID} --cluster=nautilus -;' in script
|
||||||
|
|
||||||
assert 'export JUPYTER_LOG_DIR="/home/john-doe/.jupyter/spawner/logs"' in script
|
assert 'export JUPYTER_LOG_DIR="/home/john-doe/.jupyter/spawner/logs"' in script
|
||||||
|
|
||||||
assert 'export MAMBA_EXE=/micromamba/operator/bin/micromamba;' in script
|
assert 'export MAMBA_EXE=/micromamba/operator/bin/micromamba;' in script
|
||||||
|
|
Loading…
Add table
Reference in a new issue