You can use our service desk portal for getting RIS support. RIS also offers 15 min. virtual office hours session Mon-Thru..
Containers with SLURM Jobs: Pyxis/Enroot Integration
Compute2 utilizes Enroot via Pyxis. Enroot is container runtime that allows users to launch containers from Docker images and to pull them from common container registries such as Docker Hub, Nvidia Container Registry, or Github Container Registry. Pyxis is a Slurm plugin that allows access to Enroot through srun and sbatch.
Basic Examples
The flag
--container-image=will pass your desired image via Pyxis.Launching a basic image with Pyxis (please replace
compute2-groupnamewith the appropriate Slurm account):
MODULE_MOUNTS='/etc/profile.d,/etc/sysconfig/modules,/cm,/opt/thpc'
srun -A compute2-account -p general-interactive \
--container-image='ghcr.io#washu-it-ris/ris-thpc:rocky9.2' \
--container-mounts=${MODULE_MOUNTS} \
--pty /bin/bashOther flags are available when needed:
MODULE_MOUNTS='/etc/profile.d,/etc/sysconfig/modules,/cm,/opt/thpc'
srun -A compute2-account -p general-interactive \
--container-image='ghcr.io#washu-it-ris/ris-thpc:rocky9.2' \
--containter-mounts=${MODULE_MOUNTS},/storage2/fs1/myuser/Active/data,~/outputs:/custom-outputs \
--container-env=MYVAR,OUTPUT_DIR \
--pty /bin/bashMore Container Options
--container-mounts='/path/example/a,/path/example/b:/dest/example/b': Mounts paths to be accessed inside the contain. Paths are comma separated and if thesrc:destsyntax is not used, it will be mounted to the same path as the source.
Note: If launching a container based off of the ris-thpc image, the following mounts need to be included for lmod to function:MODULE_MOUNTS='/etc/profile.d,/etc/sysconfig/modules,/cm,/opt/thpc'
More info: C2 THPC--container-env=NAME: A list of environment variables that will be forwarded to the container.--container-entrypoint: command to execute--container-workdir: The initial directory to run the provided script out of.Additional flags can be found on the Pyxis documentation.
Authentication for Private Repositories
To access private repositories, you can add your access credentials to ~/.config/enroot/.credentials.
Verify that the
~/.config/enrootdirectory exists, as it may not be instantiated by default.mkdir -p ~/.config/enrootOpen up the
.credentialsfile.vim ~/.config/enroot/.credentialsAdd the following line to the
.credentialsfile:machine <registry endpoint login <username> password <token>E.g.
machine ghcr.io login your_username password <token>
Now private images can be access from the added container registry. To add other registries, append additional lines to the
.credentialsfile.
Multiple registries can be contained within the .credentials file separated by new lines:
machine ghcr.io login <username> password <token>
machine nvcr.io login <username> password <token>
machine auth.docker.io login <username> password <token>Please make sure to replace <username> and <token> with your respective values after copying the details from here.