You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/hpc/09_ood/01_open_on_demand.md
+71-56Lines changed: 71 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,13 @@ If you're not on the NYU network, you may need to connect via NYU's Virtual Priv
10
10
This page describes how to use your Singularity with conda environment in Open OnDemand (OOD) GUI at Greene.
11
11
12
12
### Log Into Greene via the Terminal
13
-
The following commands must be run from the terminal. Information on accessing via the terminal can be found at the [Connecting to the HPC page](../02_connecting_to_hpc/01_connecting_to_hpc.mdx).
13
+
The following commands must be run from the terminal. Information on accessing via the terminal can be found at [Connecting to the HPC](../02_connecting_to_hpc/01_connecting_to_hpc.mdx).
14
14
15
15
### Preinstallation Warning
16
16
:::warning
17
17
If you have initialized Conda in your base environment, your prompt on Greene may show something like:
18
18
```sh
19
-
(base) [NETID@log-1 ~]$
19
+
(base) [NetID@log-1 ~]$
20
20
```
21
21
then you must first comment out or remove this portion of your `~/.bashrc` file:
22
22
@@ -41,116 +41,122 @@ The above code automatically makes your environment look for the default shared
Above we used the overlay file "overlay-15GB-500K.ext3.gz" which will contain all of the installed packages. There are more optional overlay files. You can find instructions on the following pages: [Singularity with Conda](../07_containers/03_singularity_with_conda.md), [Squash File System and Singularity](../07_containers/04_squash_file_system_and_singularity.md).
50
+
Above we used the overlay file `overlay-15GB-500K.ext3.gz` which will contain all of the installed packages. There are more optional overlay files. You can find instructions on the following pages: [Singularity with Conda](../07_containers/03_singularity_with_conda.md), [Squash File System and Singularity](../07_containers/04_squash_file_system_and_singularity.md).
51
51
52
52
### Launch Singularity Environment for Installation
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 `/scratch/work/public/singularity`
56
+
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 `/scratch/work/public/singularity`
57
57
58
-
Launching Singularity with the --overlay flag mounts the overlay file to a new directory: /ext3 - you will notice that when not using Singularity /ext3 is not available. Be sure that you have the Singularity prompt (Singularity>) and that /ext3 is available before the next step:
58
+
Launching Singularity with the `--overlay` flag mounts the overlay file to a new directory: `/ext3` - you will notice that when not using Singularity `/ext3` is not available.
59
+
60
+
:::warning
61
+
Be sure that you have the Singularity prompt (`Singularity>`) and that `/ext3` is available before the next step.
Singularity>conda install ipykernel --yes # Note: ipykernel is required to run as a kernel in the Open OnDemand Jupyter Notebooks
103
107
```
104
108
To confirm that your environment is appropriately referencing your Miniforge installation, try out the following:
105
-
```sh
106
-
unset which
107
-
which conda
109
+
```bash
110
+
Singularity>unset which
111
+
Singularity>which conda
108
112
# output: /ext3/miniforge3/bin/conda
109
113
110
-
which python
114
+
Singularity>which python
111
115
# output: /ext3/miniforge3/bin/python
112
116
113
-
python --version
114
-
# output: Python 3.8.5
117
+
Singularity>python --version
118
+
# output: Python 3.12.9
115
119
116
-
which pip
120
+
Singularity>which pip
117
121
# output: /ext3/miniforge3/bin/pip
118
122
```
119
123
120
-
Now use either conda install or pip to install your required python packages to the Miniforge environment.
124
+
Now use either conda or pip to install your required python packages to the Miniforge environment.
121
125
122
126
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.
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.
135
141
136
142
### Configure iPython Kernels
137
143
To create a kernel named my_env copy the template files to your home directory.
138
-
```sh
139
-
mkdir -p ~/.local/share/jupyter/kernels
140
-
cd~/.local/share/jupyter/kernels
141
-
cp -R /share/apps/mypy/src/kernel_template ./my_env # this should be the name of your Singularity env
If you used a different overlay (/scratch/$USER/my_env/overlay-15GB-500K.ext3 shown above) or .sif file (/scratch/work/public/singularity/cuda12.3.2-cudnn9.0.0-ubuntu-22.04.4.sif shown above), you MUST change those lines in the command above to the files you used.
161
167
:::
162
168
163
-
Edit the default kernel.json file by setting PYTHON_LOCATION and KERNEL_DISPLAY_NAME using a text editor like nano/vim.
169
+
Edit the default `kernel.json` file by setting PYTHON_LOCATION and KERNEL_DISPLAY_NAME using a text editor like nano/vim.
164
170
```json
165
171
{
166
172
"argv": [
@@ -194,3 +200,12 @@ Update the `"<Your NetID>"` to your own NetID without the `"<>"` symbols.
Once configured and launched, kernels can be selected in the "New" dropdown or within the notebook under the kernel menu. Please note that your notebook view may look slightly different depending on available directories and environments, as well as if you choose the lab or traditional notebook view.
0 commit comments