Skip to content

Commit 1ede2fe

Browse files
Merge pull request #1371 from NVIDIA/dholt/retire-singularity-wrapper
Retire the Singularity wrapper
2 parents ae25ff6 + 4572599 commit 1ede2fe

23 files changed

Lines changed: 35 additions & 214 deletions

File tree

config.example/group_vars/all.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -199,19 +199,6 @@ enroot_environ_config_files_dgx:
199199
content: |
200200
OMPI_MCA_btl_tcp_if_exclude=lo,docker0,ib0,ib1,ib2,ib3
201201
202-
# Singularity configuration
203-
# Playbook: singularity, slurm-cluster
204-
# Singularity target version
205-
# set an alternate singularity version here;
206-
# see roles/singularity_wrapper/defaults/main.yml for default
207-
# singularity_version:
208-
singularity_conf_path: "/etc/singularity/singularity.conf"
209-
bind_paths: []
210-
# example:
211-
#- /mnt/shared
212-
golang_install_dir: '/opt/go/{{ golang_version }}'
213-
golang_gopath: /opt/go/packages
214-
215202
################################################################################
216203
# AUTH #
217204
################################################################################

config.example/group_vars/slurm-cluster.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ dns_late: false
6666
slurm_configure_etc_hosts: yes
6767
slurm_cluster_install_cuda: yes
6868
slurm_cluster_install_nvidia_driver: yes
69-
slurm_cluster_install_singularity: no
7069

7170
################################################################################
7271
# NFS #
@@ -164,7 +163,10 @@ openmpi_configure: "./configure --prefix={{ openmpi_install_prefix }} --disable-
164163
# Open OnDemand #
165164
################################################################################
166165
install_open_ondemand: no
167-
# OOD Linux-host adapter requires `slurm_cluster_install_singularity` to be true
166+
# The OOD Linux-host adapter runs interactive apps inside an Apptainer/Singularity
167+
# container. DeepOps no longer installs Singularity (the wrapper role is retired;
168+
# Enroot/Pyxis is the supported Slurm runtime), so install Apptainer/Singularity on
169+
# the login nodes yourself before enabling this adapter.
168170
ood_install_linuxhost_adapter: no
169171

170172
servername: '{{ ansible_fqdn }}'

config.example/host_vars/gpu01

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# Example of a host-specific variable file
33
# These variables would only be used for a host named "gpu01"
44

5-
# Don't install Singularity on this host
6-
#slurm_cluster_install_singularity: false
5+
# Don't install the CUDA toolkit on this host
6+
#slurm_cluster_install_cuda: false

docs/container/docker-login.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ The [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-co
4343
4444
## Slurm jobs using private registries
4545
46-
The process for using private registries is different depending on whether you are using Singularity or Enroot as your container runtime.
46+
The process for using private registries depends on your container runtime. Enroot/Pyxis is the runtime DeepOps installs and validates for Slurm; the Singularity/Apptainer notes below apply only if your site provides that runtime separately.
4747
4848
### Singularity
4949
50-
[Singularity](https://sylabs.io/singularity/) gets container pull credentials using environment variables:
50+
DeepOps no longer installs Singularity (the wrapper role is retired; Singularity lives on upstream as [Apptainer](https://apptainer.org/), and Enroot/Pyxis is the supported Slurm runtime). If your site provides Apptainer/Singularity, it gets container pull credentials using environment variables:
5151
5252
```bash
5353
export SINGULARITY_DOCKER_USERNAME=<username>

docs/deepops/architecture.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ Roles run as part of the various playbooks. Includes default values and tasks as
109109
│ ├── roce_backend
110110
│ ├── rsyslog_client
111111
│ ├── rsyslog_server
112-
│ ├── singularity_wrapper
113112
│ ├── slurm
114113
│ ├── spack
115114
│ └── standalone-container-registry

docs/slurm-cluster/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Instructions for deploying a GPU cluster with Slurm
1414
- [Configuring shared filesystems](#configuring-shared-filesystems)
1515
- [Installing tools and applications](#installing-tools-and-applications)
1616
- [Installing Open on Demand](#installing-open-on-demand)
17-
- [Pyxis, Enroot, and Singularity](#pyxis-enroot-and-singularity)
17+
- [Pyxis and Enroot](#pyxis-and-enroot)
1818
- [Large deployments](#large-deployments)
1919

2020
## Requirements
@@ -236,9 +236,11 @@ See the documentation on [software modules](./software-modules.md) for informati
236236

237237
[Open OnDemand](https://openondemand.org/) can be installed by setting the `install_open_ondemand` variable to yes before running the `slurm-cluster.yml` playbook.
238238

239-
## Pyxis, Enroot, and Singularity
239+
## Pyxis and Enroot
240240

241-
[Pyxis](https://github.com/NVIDIA/pyxis) and [Enroot](https://github.com/NVIDIA/enroot) are installed by default and can be disabled by setting `slurm_install_enroot` and `slurm_install_pyxis` to no. Singularity can be installed by setting the `slurm_cluster_install_singularity` variable to yes before running the `slurm-cluster.yml` playbook.
241+
[Pyxis](https://github.com/NVIDIA/pyxis) and [Enroot](https://github.com/NVIDIA/enroot) are installed by default and can be disabled by setting `slurm_install_enroot` and `slurm_install_pyxis` to no. They are the supported, release-validated container runtime for Slurm in DeepOps.
242+
243+
The DeepOps Singularity wrapper role has been retired. Singularity lives on upstream as [Apptainer](https://apptainer.org/); sites that still want it can install Apptainer/Singularity separately.
242244

243245
## Large deployments
244246

docs/slurm-cluster/slurm-single-node.md

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Single Node Slurm Deployment Guide
1111
- [Allocating GPUs](#allocating-gpus)
1212
- [Running Containers](#running-containers)
1313
- [Rootless Docker](#rootless-docker)
14-
- [Enroot and Singularity](#enroot-and-singularity)
14+
- [Enroot and Pyxis](#enroot-and-pyxis)
1515

1616
## Introduction
1717

@@ -92,7 +92,7 @@ The general requirements and procedure for Slurm setup via deepops is documented
9292

9393
b. Configuring `"config/group_vars/slurm-cluster.yml"`
9494

95-
Typically users cannot ssh as local users directly to compute nodes in a Slurm cluster without a Slurm reservation. However, since in this deployment a compute node also functions as a login node we need to add users to slurm configuration for the ability to ssh as local users. Again, this is needed when a compute node also functions as a login node. Additionally, set the singularity install option (which is no by default). Singularity can be used to run containers and it will be used to set up rootless options as well. Do not set a default NFS with single node deployment.
95+
Typically users cannot ssh as local users directly to compute nodes in a Slurm cluster without a Slurm reservation. However, since in this deployment a compute node also functions as a login node we need to add users to slurm configuration for the ability to ssh as local users. Again, this is needed when a compute node also functions as a login node. Do not set a default NFS with single node deployment.
9696

9797
```bash
9898
vi config/group_vars/slurm-cluster.yml
@@ -101,7 +101,6 @@ The general requirements and procedure for Slurm setup via deepops is documented
101101
```yaml
102102
slurm_enable_nfs_server: false
103103
slurm_enable_nfs_client_nodes: false
104-
slurm_cluster_install_singularity: yes
105104

106105
slurm_login_on_compute: true
107106

@@ -331,8 +330,8 @@ attach to the tmux session in the adopted ssh session.
331330
332331
### Running Containers
333332
334-
DeepOps enables running containers with several containerization platforms:
335-
docker, singularity, and enroot with pyxis.
333+
DeepOps enables running containers on Slurm with rootless Docker and with
334+
Enroot/Pyxis, which is installed by default.
336335
337336
#### Rootless Docker
338337
@@ -441,7 +440,7 @@ cat: /slurm/slurmdbd.conf: Permission denied
441440
Rootless docker supports building containers and many standard docker features
442441
with a few limitations. These limitations can make it challenging to run
443442
multi node Slurm jobs, therefore for multi node jobs on Slurm the recommended
444-
approach is via enroot or singularity.
443+
approach is via Enroot/Pyxis.
445444
446445
A user can explicitly stop the rootless docker daemon with “stop_rootless_docker.sh”
447446
script, or just exit the Slurm session. Upon exit from a slurm session the
@@ -458,11 +457,11 @@ login-session:$
458457
These scripts “start_rootless_docker.sh” and “stop_rootless_docker.sh” appear
459458
on a user's path upon loading the rootless docker module.
460459
461-
### Enroot and Singularity
460+
### Enroot and Pyxis
462461
463-
Singularity and enroot could also be deployed via DeepOps. These would be
464-
useful for multi-node jobs if running on more than one DGX system.
465-
Enroot with pyxis can be tested by running:
462+
Enroot with Pyxis is installed by DeepOps by default and is the supported
463+
container runtime for multi-node jobs across more than one DGX system.
464+
It can be tested by running:
466465
467466
The examples below use `registry.example.com/hpc/nccl-tests:latest` as a placeholder for a site-maintained NCCL tests image.
468467
@@ -504,25 +503,10 @@ will typically be inferred from the environment. Calling mpirun approach could
504503
be useful, because certain binding options are not available to srun directly,
505504
but can be set via mpirun.
506505
507-
Singularity could be used in a similar fashion to enroot. Don’t forget the
508-
“--nv” option for GPUs.
509-
510-
```bash
511-
login-session:srun --mpi=pmi2 --ntasks=2 --gpus-per-task=1 \
512-
singularity exec --nv docker://registry.example.com/hpc/nccl-tests:latest \
513-
all_reduce_perf -b 1M -e 4G -f 2 -g 1
514-
```
515-
516-
Similarly to invoke mpirun with singularity run script (same script as was used
517-
with enroot):
518-
519-
```bash
520-
login-session:srun --ntasks=2 --gpus-per-task=1 \
521-
singularity exec --nv docker://registry.example.com/hpc/nccl-tests:latest \
522-
${PWD}/test_allreduce.sh
523-
```
524-
525-
Refer to singularity documentation for further details. Building containers with
526-
singularity is permitted to non-privileged users via the “--fakeroot” option.
527-
Enroot and singularity excel at running containerized multi node jobs, which is
528-
somewhat difficult and less convenient to do using docker on Slurm.
506+
The DeepOps Singularity wrapper role has been retired, so DeepOps no longer
507+
installs Singularity. Singularity lives on upstream as
508+
[Apptainer](https://apptainer.org/); if your site installs Apptainer/Singularity
509+
separately, it can run the same containers with `singularity exec --nv` (remember
510+
the “--nv” option for GPUs). Enroot/Pyxis is the supported path and excels at
511+
running containerized multi node jobs, which is somewhat difficult and less
512+
convenient to do using docker on Slurm.

docs/slurm-cluster/slurm-usage.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,14 @@ scancel JOBID
128128
To run a deep learning job with multiple processes, use MPI:
129129

130130
```bash
131-
srun -p PARTITION --pty /bin/bash
132-
singularity pull docker://nvcr.io/nvidia/tensorflow:19.05-py3
133-
singularity run docker://nvcr.io/nvidia/tensorflow:19.05-py3
134-
cd /opt/tensorflow/nvidia-examples/cnn/
135-
mpiexec --allow-run-as-root -np 2 python resnet.py --layers=50 --batch_size=32 --precision=fp16 --num_iter=50
131+
srun -p PARTITION --gpus-per-task=1 \
132+
--container-image=nvcr.io/nvidia/tensorflow:19.05-py3 \
133+
bash -c "cd /opt/tensorflow/nvidia-examples/cnn/ && \
134+
mpiexec --allow-run-as-root -np 2 python resnet.py --layers=50 --batch_size=32 --precision=fp16 --num_iter=50"
136135
```
137136

137+
The `--container-image` flag runs the job inside the image using Pyxis/Enroot, which DeepOps installs by default.
138+
138139
## Additional Resources
139140

140141
- [SchedMD Slurm Quickstart Guide](https://slurm.schedmd.com/quickstart.html)

playbooks/container/singularity.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

playbooks/slurm-cluster.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,6 @@
137137
hostlist: "{{ rsyslog_client_group | default('slurm-node') }}"
138138
when: slurm_enable_rsyslog_client|default(true)
139139

140-
- name: Install Singularity
141-
import_playbook: container/singularity.yml
142-
when: slurm_cluster_install_singularity|default(true)
143-
144140
- name: Install Open OnDemand
145141
import_playbook: slurm-cluster/open-ondemand.yml
146142
when: install_open_ondemand

0 commit comments

Comments
 (0)