-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for sbatch #55
Comments
Dear Felix, Primary focus is single node at the moment. edit: clarified usacase |
@dr-br could you try the following branch? https://github.com/NVIDIA/pyxis/tree/2021-08-06/sbatch-salloc-support sbatchYou might need to edit the pyxis plugstack config if you are not using the default value for $ scontrol show config | grep Spool
SlurmdSpoolDir = /var/spool/slurmd If you use a different path, you will need to use the new plugstack option to override the path, for example: $ cat /etc/slurm/plugstack.conf.d/pyxis.conf
required /usr/local/lib/slurm/spank_pyxis.so slurmd_spool_dir=/var/run/slurmd This is required because we can't query the Slurm configuration from a SPANK plugin (I will open an RFE against Slurm for this). sallocSupport for $ salloc --container-image=ubuntu:18.04 --no-container-mount-home
salloc: Granted job allocation 292
pyxis: importing docker image ...
root@node-1:/# grep PRETTY /etc/os-release
PRETTY_NAME="Ubuntu 18.04.5 LTS" Without $ salloc --container-image=ubuntu:18.04 --no-container-mount-home
salloc: Granted job allocation 293
$ grep PRETTY /etc/os-release
PRETTY_NAME="Ubuntu 21.04"
$ srun --pty bash
pyxis: importing docker image ...
root@ioctl:/# grep PRETTY /etc/os-release
PRETTY_NAME="Ubuntu 18.04.5 LTS" multi-nodeAs I mentioned above, it's tricky to use a containerized multi-node sbatch (as you have to go to great lengths to enable |
And here is a run.sub example: #!/bin/bash -eux
#SBATCH --container-image ubuntu:18.04
grep PRETTY /etc/os-release Usage: $ sbatch run.sub
Submitted batch job 294
$ cat slurm-294.out
pyxis: importing docker image ...
+ grep PRETTY /etc/os-release
PRETTY_NAME="Ubuntu 18.04.5 LTS" |
Actually, please try v2 of the patch instead, on this branch: https://github.com/NVIDIA/pyxis/tree/2021-08-06/sbatch-salloc-support-v2 It will avoid the need to specify the spool dir, as it will only bind mount the sbatch script and not the whole dir. |
We will try and give you feedback ASAP. |
Feedback: Will this feature be mainlined? Thanks a lot |
Yes, it will be mainlined, I'll do a bit more testing and push to the main branch. |
Pushed in this commit: 6833333 This is not part of a pyxis release yet. |
We intend to use enroot for providing containerized Jupyter environments.
batchspawner for Jupyterhub relies on the usage of sbatch.
Would it be possible to add the pyxis functionalities also to sbatch? Or is there a known workaround?
Thanks and best regards from Karlsruhe! ;)
The text was updated successfully, but these errors were encountered: