Skip to content

Commit 70a68db

Browse files
authored
Merge pull request #239 from NYU-RTS/main
Updating DTN info
2 parents 53d7779 + 4064b43 commit 70a68db

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

docs/hpc/07_containers/03_singularity_with_conda.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,14 @@ For the most recent supported versions of PyTorch, please check the [PyTorch web
8383

8484
Launch the appropriate Singularity container in read/write mode (with the :rw flag):
8585
```sh
86-
singularity exec --overlay overlay-15GB-500K.ext3:rw /share/apps/images/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif /bin/bash
86+
singularity exec --fakeroot --overlay overlay-15GB-500K.ext3:rw /share/apps/images/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif /bin/bash
8787
```
8888

89-
The above starts a bash shell inside the referenced Singularity Container overlaid with the 15GB 500K you set up earlier. This creates the functional illusion of having a writable filesystem inside the typically read-only Singularity container.
89+
The above starts a bash shell inside the referenced Singularity Container overlaid with the 15GB 500K you set up earlier. This creates the functional illusion of having a writable filesystem inside the typically read-only Singularity container.
90+
91+
:::note
92+
Please note that the default Singularity on Torch is now Apptainer, which requires the --fakeroot option to load overlay files in read/write mode.
93+
:::
9094

9195
Now, inside the container, download and install miniforge to `/ext3/miniforge3`:
9296
```bash
@@ -164,7 +168,7 @@ The login nodes restrict memory to 2GB per user, which may cause some large pack
164168
After it is running, you’ll be redirected to a compute node. From there, run singularity to setup on conda environment, same as you were doing on login node:
165169

166170
```sh
167-
[NetID@cm001 pytorch-example]$ singularity exec --overlay overlay-15GB-500K.ext3:rw /share/apps/images/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif /bin/bash
171+
[NetID@cm001 pytorch-example]$ singularity exec --fakeroot --overlay overlay-15GB-500K.ext3:rw /share/apps/images/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif /bin/bash
168172

169173
Singularity> source /ext3/env.sh
170174
# activate the environment

docs/hpc/09_ood/07_jupyter_with_conda_singularity.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Above we used the overlay file `overlay-15GB-500K.ext3.gz` which will contain al
6565

6666
### Launch Singularity Environment for Installation
6767
```bash
68-
[NetID@log-1 ~]$ singularity exec --overlay /scratch/$USER/my_env/overlay-15GB-500K.ext3:rw /share/apps/images/cuda12.3.2-cudnn9.0.0-ubuntu-22.04.4.sif /bin/bash
68+
[NetID@log-1 ~]$ singularity exec --fakeroot --overlay /scratch/$USER/my_env/overlay-15GB-500K.ext3:rw /share/apps/images/cuda12.3.2-cudnn9.0.0-ubuntu-22.04.4.sif /bin/bash
6969
```
7070
Above we used the Singularity OS image `cuda12.3.2-cudnn9.0.0-ubuntu-22.04.4.sif` which provides the base operating system environment for the conda environment. There are other Singularity OS images available at `/share/apps/images`
7171

@@ -137,6 +137,8 @@ Singularity> which pip
137137

138138
Now use either conda or pip to install your required python packages to the Miniforge environment.
139139

140+
:::note If using Apptainer (the default Singularity installation on Torch) be sure to use the --fakeroot flag when launching overlay files in read-write mode (:rw).
141+
140142
To install larger packages, like Tensorflow, you must first start an interactive job with adequate compute and memory resources to install packages. The login nodes restrict memory to 2GB per user, which may cause some large packages to crash.
141143
```bash
142144
Singularity> exit
@@ -145,7 +147,7 @@ Singularity> exit
145147

146148
# wait to be assigned a node
147149

148-
[NetID@cm001 my_env]$ singularity exec --overlay /scratch/$USER/my_env/overlay-15GB-500K.ext3:rw /share/apps/images/cuda12.3.2-cudnn9.0.0-ubuntu-22.04.4.sif /bin/bash
150+
[NetID@cm001 my_env]$ singularity exec --fakeroot --overlay /scratch/$USER/my_env/overlay-15GB-500K.ext3:rw /share/apps/images/cuda12.3.2-cudnn9.0.0-ubuntu-22.04.4.sif /bin/bash
149151

150152
Singularity> source /ext3/env.sh
151153
# activate the environment

0 commit comments

Comments
 (0)