Skip to content

Commit bb6049d

Browse files
authored
Merge pull request #246 from NYU-RTS/mdweisner-singularity-copy-improvements-1
Update 03_singularity_with_conda.md
2 parents 381db2c + 7003c82 commit bb6049d

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/hpc/07_containers/03_singularity_with_conda.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ The above starts a bash shell inside the referenced Singularity Container overla
9292
Please note that the default Singularity on Torch is now Apptainer, which requires the --fakeroot option to load overlay files in read/write mode.
9393
:::
9494

95-
Now, inside the container, download and install miniforge to `/ext3/miniforge3`:
95+
Now, inside the container, download and install miniforge to `/ext3/miniforge3`.
96+
97+
:::note
98+
Please note your prompt should indicate you're in singularity with the `Singularity>` prompt
99+
:::
100+
96101
```bash
97102
wget --no-check-certificate https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
98103
bash Miniforge3-Linux-x86_64.sh -b -p /ext3/miniforge3
@@ -167,6 +172,11 @@ srun --cpus-per-task=2 --mem=10GB --time=04:00:00 --pty /bin/bash
167172

168173
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. Your prompt should look similar to this:
169174
```sh
175+
# Your prompt should now look something like this once your jobs starts: [NetID@cm001 pytorch-example]$
176+
177+
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
178+
179+
source /ext3/env.sh
170180
[NetID@cm001 pytorch-example]$
171181
```
172182
Then you can activate your environment:
@@ -509,6 +519,7 @@ Building on the previous Julia example, this will demonstrate how to set up a si
509519

510520
Copy overlay image:
511521
```sh
522+
cd ~/julia
512523
cp -rp /share/apps/overlay-fs-ext3/overlay-2GB-100K.ext3.gz .
513524
gunzip overlay-2GB-100K.ext3.gz
514525
mv overlay-2GB-100K.ext3 julia-pkgs.ext3
@@ -566,6 +577,9 @@ julia --version
566577
Run Julia to install packages:
567578
```julia
568579
julia
580+
julia> using Pkg
581+
julia> Pkg.add("KNITRO")
582+
julia> Pkg.add("JuMP")
569583
# Your prompt should now be julia>
570584
using Pkg
571585
Pkg.add("KNITRO")

0 commit comments

Comments
 (0)