diff --git a/docs/hpc/07_containers/03_singularity_with_conda.md b/docs/hpc/07_containers/03_singularity_with_conda.md index 51182ced6..614d0a86b 100644 --- a/docs/hpc/07_containers/03_singularity_with_conda.md +++ b/docs/hpc/07_containers/03_singularity_with_conda.md @@ -83,10 +83,14 @@ For the most recent supported versions of PyTorch, please check the [PyTorch web Launch the appropriate Singularity container in read/write mode (with the :rw flag): ```sh -singularity exec --overlay overlay-15GB-500K.ext3:rw /share/apps/images/cuda12.1.1-cudnn8.9.0-devel-ubuntu22.04.2.sif /bin/bash +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 ``` -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. +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. + +:::note +Please note that the default Singularity on Torch is now Apptainer, which requires the --fakeroot option to load overlay files in read/write mode. +::: Now, inside the container, download and install miniforge to `/ext3/miniforge3`: ```bash @@ -164,7 +168,7 @@ The login nodes restrict memory to 2GB per user, which may cause some large pack 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: ```sh -[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 +[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 Singularity> source /ext3/env.sh # activate the environment diff --git a/docs/hpc/09_ood/07_jupyter_with_conda_singularity.mdx b/docs/hpc/09_ood/07_jupyter_with_conda_singularity.mdx index 5f007e8f7..22309b44c 100644 --- a/docs/hpc/09_ood/07_jupyter_with_conda_singularity.mdx +++ b/docs/hpc/09_ood/07_jupyter_with_conda_singularity.mdx @@ -65,7 +65,7 @@ Above we used the overlay file `overlay-15GB-500K.ext3.gz` which will contain al ### Launch Singularity Environment for Installation ```bash -[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 +[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 ``` 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` @@ -137,6 +137,8 @@ Singularity> which pip Now use either conda or pip to install your required python packages to the Miniforge environment. +:::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). + 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. ```bash Singularity> exit @@ -145,7 +147,7 @@ Singularity> exit # wait to be assigned a node -[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 +[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 Singularity> source /ext3/env.sh # activate the environment