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/02_jupyter_with_conda_singularity.mdx
-197Lines changed: 0 additions & 197 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,200 +6,3 @@ This page describes how to use your Singularity with conda environment in OOD GU
6
6
### Log Into Greene via the Terminal
7
7
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) or you can log into OOD and select the `Clusters` tab at the top of the page and select `Greene Shell Access`.
8
8
9
-
### Preinstallation Warning
10
-
:::warning
11
-
If you have initialized Conda in your base environment, your prompt on Greene may show something like:
12
-
```sh
13
-
(base) [NetID@log-1 ~]$
14
-
```
15
-
then you must first comment out or remove this portion of your `~/.bashrc` file:
16
-
17
-
```bash
18
-
# >>> conda initialize >>>
19
-
# !! Contents within this block are managed by 'conda init' !!
The above code automatically makes your environment look for the default shared installation of Conda on the cluster and will sabotage any attempts to install packages to a Singularity environment. Once removed or commented out, log out and back into the cluster for a fresh environment.
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).
45
-
46
-
### 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`
51
-
52
-
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.
53
-
54
-
:::warning
55
-
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
101
-
```
102
-
To confirm that your environment is appropriately referencing your Miniforge installation, try out the following:
103
-
```bash
104
-
Singularity>unset which
105
-
Singularity> which conda
106
-
# output: /ext3/miniforge3/bin/conda
107
-
108
-
Singularity> which python
109
-
# output: /ext3/miniforge3/bin/python
110
-
111
-
Singularity> python --version
112
-
# output: Python 3.12.9
113
-
114
-
Singularity> which pip
115
-
# output: /ext3/miniforge3/bin/pip
116
-
```
117
-
118
-
Now use either conda or pip to install your required python packages to the Miniforge environment.
119
-
120
-
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
-
136
-
### Configure iPython Kernels
137
-
To create a kernel named my_env copy the template files to your home directory.
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
-
:::
162
-
163
-
Edit the default `kernel.json` file by setting PYTHON_LOCATION and KERNEL_DISPLAY_NAME using a text editor like nano/vim.
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