Skip to content

Commit

Permalink
Merge pull request #26 from eth-cscs/spawner-update
Browse files Browse the repository at this point in the history
Allow multiple nodes
  • Loading branch information
rsarm committed Aug 9, 2024
2 parents d5c82f1 + 95923ea commit d113cbe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN . /opt/conda/bin/activate && \

RUN . /opt/conda/bin/activate && \
conda activate $__CONDA_ENV__ && \
pip install --no-cache jupyterhub==4.1.5 pyfirecrest==2.1.0 SQLAlchemy==1.4.52 oauthenticator==16.3.1
pip install --no-cache jupyterhub==4.1.6 pyfirecrest==2.1.0 SQLAlchemy==1.4.52 oauthenticator==16.3.1

COPY . firecrestspawner
RUN . /opt/conda/bin/activate && \
Expand Down
6 changes: 6 additions & 0 deletions firecrestspawner/spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ class FirecRESTSpawnerBase(Spawner):
help="Number of processors to request from resource manager"
).tag(config=True)

req_nnodes = Unicode(
'',
help="Number of nodes to request from resource manager"
).tag(config=True)

req_ngpus = Unicode(
'',
help="Number of GPUs to request from resource manager"
Expand Down Expand Up @@ -514,6 +519,7 @@ class SlurmSpawner(FirecRESTSpawnerRegexStates):
{% if memory %}#SBATCH --mem={{memory}}{% endif %}
{% if gres %}#SBATCH --gres={{gres}}{% endif %}
{% if nprocs %}#SBATCH --cpus-per-task={{nprocs}}{% endif %}
{% if nnodes %}#SBATCH --nodes={{nnodes}}{% endif %}
{% if reservation%}#SBATCH --reservation={{reservation}}{% endif %}
{% if constraint %}#SBATCH --constraint={{constraint}}{% endif %}
{% if options %}#SBATCH {{options}}{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jupyterhub==4.1.5
jupyterhub==4.1.6
pyfirecrest==2.1.0
SQLAlchemy==1.4.52
oauthenticator==16.3.1

0 comments on commit d113cbe

Please sign in to comment.