Skip to content

Commit 9ceaebb

Browse files
authored
Update 03_singularity_with_conda.md
1 parent 4e7b7aa commit 9ceaebb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/hpc/07_containers/03_singularity_with_conda.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ exit
147147
# exit Singularity
148148
```
149149

150-
#### Install packages
150+
#### Install Packages
151151

152152
You may now install packages into the environment with either the `pip install` or `conda install` commands.
153153

@@ -202,7 +202,7 @@ Now, exit the Singularity container and then rename the overlay image. Typing `e
202202
exit
203203
mv overlay-15GB-500K.ext3 my_pytorch.ext3
204204
```
205-
#### Test your PyTorch Singularity Image
205+
#### Test Your PyTorch Singularity Image
206206
```sh
207207
singularity exec --overlay /scratch/<NetID>/pytorch-example/my_pytorch.ext3:ro /share/apps/images/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif /bin/bash -c 'source /ext3/env.sh; python -c "import torch; print(torch.__file__); print(torch.__version__)"'
208208

@@ -213,7 +213,7 @@ singularity exec --overlay /scratch/<NetID>/pytorch-example/my_pytorch.ext3:ro /
213213
the end `:ro` addition at the end of the pytorch ext3 image starts the image in read-only mode. To add packages you will need to use `:rw` to launch it in read-write mode.
214214
:::
215215

216-
### Using your Singularity Container in a SLURM Batch Job
216+
### Using Your Singularity Container in a SLURM Batch Job
217217
Below is an example script of how to call a python script, in this case `torch-test.py`, from a SLURM batch job using your new Singularity image
218218

219219
torch-test.py:
@@ -276,7 +276,7 @@ cat slurm-3752662.out
276276
# True
277277
```
278278

279-
### Optional: Convert ext3 to a compressed, read-only squashfs filesystem
279+
### Optional: Convert ext3 to a Compressed, Read-only Squashfs Filesystem
280280
Singularity images can be compressed into read-only squashfs filesystems to conserve space in your environment. Use the following steps to convert your ext3 Singularity image into a smaller squashfs filesystem.
281281
```sh
282282
srun -N1 -c4 singularity exec --overlay my_pytorch.ext3:ro /share/apps/images/centos-8.2.2004.sif mksquashfs /ext3 /scratch/<NetID>/pytorch-example/my_pytorch.sqf -keep-as-directory -processors 4 -noappend

0 commit comments

Comments
 (0)