Skip to content

Commit d236293

Browse files
authored
Add recipe on running Jupyter Docker Stacks with Singularity (#2357)
1 parent b40191d commit d236293

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/using/recipes.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,3 +520,20 @@ they may be explained in the "Installation instructions" section of the Download
520520
```{literalinclude} recipe_code/oracledb.dockerfile
521521
:language: docker
522522
```
523+
524+
## Running Jupyter Docker Stacks with Singularity
525+
526+
You can also start Jupyter Docker Stacks containers using **Singularity** instead of Docker. For example:
527+
528+
```bash
529+
singularity run --bind "${PWD}:/home/${USER}/work" --containall docker://quay.io/jupyter/datascience-notebook:2025-03-14
530+
```
531+
532+
- `--bind "${PWD}:/home/${USER}/work"` mounts your current working directory into the container at `/home/$USER/work`.
533+
When running the image with Singularity, the container uses your host username inside the container.
534+
Therefore, the bind target is `/home/${USER}/work` instead of the usual `/home/jovyan/work`.
535+
536+
- `--containall` starts the container in a fully isolated environment, ignoring most of the host’s filesystem and environment except for explicitly bound paths.
537+
By default, Singularity would bind your home directory automatically.
538+
If you have Python packages installed there, this may cause conflicts with packages inside the container.
539+
Using `--containall` avoids such interference.

0 commit comments

Comments
 (0)