Skip to content

Commit 1957e3b

Browse files
committed
Merge branch 'main' into gh-pages
2 parents 1ec314b + 0ff169c commit 1957e3b

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Deploy static content to Pages
44
on:
55
# Runs on pushes targeting the default branch
66
push:
7-
branches: ["main", "prod", "gh-pages"]
7+
branches: ["prod", "gh-pages"]
88

99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:

interactive-compute.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,35 @@ Replace `<path-to-miniconda3>` and `<your-environment-name>` appropriately.
9191
Fill the rest of the form as you would for any provided Jupyter Instance and click "Launch". If you run into any issues, please see [Debugging your interactive session](#debugging).
9292

9393

94-
#### In an Apptainer container
94+
#### In a container (such as Apptainer)
9595

96-
Once you have built or pulled an Apptainer image on SDF (see [Software/Apptainer](software.md#apptainer) page for more information on how to do that), ensuring that you have the `jupyter[lab]` binary in the image's `PATH`, go to the [Jupyter portal](/pun/sys/dashboard/batch_connect/sys/slac-ood-jupyter/session_contexts/new ':ignore'), select "Custom Apptainer Image" from the "Jupyter Instance" dropown menu. Then modify the text in the "Commands to initiate Jupyter":
96+
Once you have built or pulled an Apptainer or other OCI container image on SDF (see [Software/Apptainer](software.md#apptainer) page for more information on how to do that), ensuring that you have the `jupyter[lab]` binary in the image's `PATH`, go to the [Jupyter portal](/pun/sys/dashboard/batch_connect/sys/slac-ood-jupyter/session_contexts/new ':ignore'), select "Custom Apptainer Image" from the "Jupyter Instance" dropown menu. Then modify the text in the "Commands to initiate Jupyter":
9797
```bash
98-
export APPTAINER_IMAGE_PATH=<path-to-the.sif>
99-
function jupyter() { apptainer exec --nv -B /sdf,/lscratch ${APPTAINER_IMAGE_PATH} jupyter $@; }
98+
export APPTAINER_IMAGE_PATH=<path to apptainer image>
99+
function jupyter() {
100+
apptainer \
101+
exec \
102+
--nv \
103+
-B /sdf,/fs,/sdf/scratch,/lscratch \
104+
${APPTAINER_IMAGE_PATH} \
105+
jupyter $@;
106+
}
100107
```
101108

102-
Replace `<path-to-the.sif>` with the full path to your local apptainer image file.
109+
Replace `<path-to-the.sif>` with a path to the image you want to use for jupyter. For example, `<path-to-the.sif>` could be:
110+
- The full path to an image you've already built on SDF: For example, if you ran `apptainer build` in your home directory, the image path may be `/sdf/home/u/username/my-special-jupyter.sif`
111+
- A tag available publicly on a remote registry (for example, `docker://jupyter/datascience-notebook:lab-4.0.7`) would download and use [a specific version of Jupyter Lab](https://hub.docker.com/layers/jupyter/datascience-notebook/lab-4.0.7/images/sha256-9504f4f4ab7e89b49d61d7be2e9ff8c57870de2050aa4360f55b2e59193f7486?context=explore) already packaged into a container by Project Jupyter.
112+
- Note: If you use this method, the image will still need to be downloaded onto SDF and will (by default) take up disk space in your home directory under `~/.apptainer` to store the resulting image.
103113

104-
Fill the rest of the form as you would for any provided Jupyter Instance and click "Launch". If you run into any issues, please see [Debugging your interactive session](#debugging).
114+
By default `apptainer` overrides your terminal prompt with `Apptainer> ` in order to emphasize that you are opening a terminal within a container.
115+
If you prefer a less stark reminder you may instead include the following lines in `~/.bashrc` for a more familiar prompt with a subtler `(apptainer)` prefix indicating the environment is within a container.
116+
```bash
117+
# add a prefix if this shell is in a container
118+
export PROMPT_COMMAND='[ -f /singularity ] && PS1="(apptainer) ${PS1}"; unset PROMPT_COMMAND'
119+
```
120+
This would make the terminals that you open in Jupyter Lab appear with your customary prompt, except for the additional `(apptainer) ` prefix.
121+
122+
Complete the rest of the form as you would for any provided Jupyter Instance and click "Launch". If you run into any issues, please see [Debugging your interactive session](#debugging).
105123

106124

107125
#### Debugging your interactive session :id=debugging

0 commit comments

Comments
 (0)