Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions 2026/HPSF/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Flux Jupyter Tutorial

This set of tutorials provides:

- [Building Tutorial Image](#build-images)

Pre-requisites:

- Docker client installed locally
- Excitement to learn about Flux!

## Build Image

Build the tutorial image.

```bash
docker build -f ./docker/Dockerfile -t hpsf-flux .
```

## Run Image

Run the Image.

```bash
docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock --name jupyterhub -p 8888:8888 hpsf-flux
```
104 changes: 104 additions & 0 deletions 2026/HPSF/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
FROM fluxrm/flux-sched:noble

# Based off of https://github.com/jupyterhub/zero-to-jupyterhub-k8s/tree/main/images/singleuser-sample
# Local usage
# docker run -p 8888:8888 -v $(pwd):/home/jovyan/work test

USER root

ENV NB_USER=jovyan \
NB_UID=1000 \
HOME=/home/jovyan

RUN adduser \
--disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
--home ${HOME} \
--force-badname \
${NB_USER}

RUN apt-get update \
# && apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
gcc-10 \
g++-10 \
ca-certificates \
dnsutils \
iputils-ping \
python3 \
python3-dev \
python3-pip \
python3-venv \
openmpi-bin \
openmpi-common \
libopenmpi-dev \
liblz4-dev \
tini \
nodejs \
python3-greenlet \
# requirement for nbgitpuller
git \
&& rm -rf /var/lib/apt/lists/*

ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

COPY ./docker/requirements_venv.txt ./requirements_venv.txt
RUN python3 -m venv $VIRTUAL_ENV && pip install --no-cache-dir -r requirements_venv.txt
COPY ./docker/requirements.txt ./requirements.txt

RUN pip install ruamel.yaml.clib && \
pip install -r requirements.txt && \
pip install ipykernel pycurl IPython && \
python -m IPython kernel install

RUN wget https://nodejs.org/dist/v20.15.0/node-v20.15.0-linux-x64.tar.xz && \
apt-get update && apt-get install -y xz-utils && rm -rf /var/lib/apt/lists/* && \
xz -d -v node-v20.15.0-linux-x64.tar.xz && \
tar -C /usr/local --strip-components=1 -xvf node-v20.15.0-linux-x64.tar

# This customizes the launcher UI
# https://jupyter-app-launcher.readthedocs.io/en/latest/usage.html
RUN pip install jupyter_app_launcher && \
pip install --upgrade jupyter-server && \
pip install jupyter-launcher-shortcuts && \
pip install jupyterhub_idle_culler && \
mkdir -p /usr/local/share/jupyter/lab/jupyter_app_launcher && \
pip install jupyterhub && \
pip install ipywidgets

# This customizes the launcher UI
# https://jupyter-app-launcher.readthedocs.io/en/latest/usage.html
RUN pip install jupyter_app_launcher && \
pip install --upgrade jupyter-server && \
pip install jupyter-launcher-shortcuts && \
mkdir -p /usr/local/share/jupyter/lab/jupyter_app_launcher

COPY ./tutorial /home/jovyan/
COPY ./docker/jupyter-launcher.yaml /usr/local/share/jupyter/lab/jupyter_app_launcher/jp_app_launcher.yaml
ENV JUPYTER_APP_LAUNCHER_PATH=/usr/local/share/jupyter/lab/jupyter_app_launcher/

# Give jovyan user permissions to tutorial materials
RUN chmod -R 777 ~/ /home/jovyan

WORKDIR $HOME
# Flux assets in the tutorial/ directory were moved to tutorial/img/
# this shouldn't be a problem for the next command but making a note in case
COPY ./docker/flux-icon.png $HOME/flux-icon.png

# note that previous examples are added via git volume in config.yaml
ENV SHELL=/usr/bin/bash
ENV FLUX_URI_RESOLVE_LOCAL=t

EXPOSE 8888
ENTRYPOINT ["tini", "--"]

# This is for JupyterHub
COPY ./docker/entrypoint.sh /entrypoint.sh
RUN mkdir -p $HOME/.local/share && \
chmod 777 $HOME/.local/share

USER ${NB_USER}

CMD ["flux", "start", "--test-size=4", "jupyter", "lab", "--ip=0.0.0.0"]
3 changes: 3 additions & 0 deletions 2026/HPSF/docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

/usr/bin/flux start --test-size=4 /usr/local/bin/jupyterhub-singleuser
Binary file added 2026/HPSF/docker/flux-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
100 changes: 100 additions & 0 deletions 2026/HPSF/docker/jupyter-launcher.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
- title: Flux Tutorial Notebook
description: This is the main Flux Framework Tutorial
type: jupyterlab-commands
icon: ./static/flux-icon.png
source:
- label: Flux Tutorial
id: 'filebrowser:open-path'
args:
path: ./tutorial/ch1/01_flux_tutorial.ipynb
icon: ./static/flux-icon.png
catalog: Notebook

- title: Flux Python SDK Tutorial
description: This notebook will teach you about the Flux Python SDK
type: jupyterlab-commands
icon: ./static/flux-icon.png
source:
- label: Flux Tutorial
id: 'filebrowser:open-path'
args:
path: ./tutorial/ch2/02_flux_framework.ipynb
icon: ./static/flux-icon.png
catalog: Notebook

- title: Flux Process, Monitoring, Utilities Tutorial
description: This will teach you about Flux utilities
type: jupyterlab-commands
icon: ./static/flux-icon.png
source:
- label: Flux Tutorial
id: 'filebrowser:open-path'
args:
path: ./tutorial/ch3/03_flux_tutorial.ipynb
icon: ./static/flux-icon.png
catalog: Notebook

- title: Flux Framework and User-space Kubernetes
description: This will teach you about running AI/ML workloads with Flux and Kubernetes
type: jupyterlab-commands
icon: ./static/flux-icon.png
source:
- label: Flux Tutorial
id: 'filebrowser:open-path'
args:
path: ./tutorial/ch4/04_flux_framework_usernetes.ipynb
icon: ./static/flux-icon.png
catalog: Notebook

- title: Flux Framework Portal
description: Flux Framework portal for projects, releases, and publication.
source: https://flux-framework.org/
type: url
catalog: Flux Resources
args:
sandbox: [ 'allow-same-origin', 'allow-scripts', 'allow-downloads', 'allow-modals', 'allow-popups']
- title: Flux Documentation
source: https://flux-framework.readthedocs.io/en/latest/
type: url
catalog: Flux Resources
args:
sandbox: [ 'allow-same-origin', 'allow-scripts', 'allow-downloads', 'allow-modals', 'allow-popups']
- title: Flux Cheat Sheet
source: https://flux-framework.org/cheat-sheet/
type: url
catalog: Flux Resources
args:
sandbox: [ 'allow-same-origin', 'allow-scripts', 'allow-downloads', 'allow-modals', 'allow-popups']
- title: Flux Glossary of Terms
source: https://flux-framework.readthedocs.io/en/latest/glossary.html
type: url
catalog: Flux Resources
args:
sandbox: [ 'allow-same-origin', 'allow-scripts', 'allow-downloads', 'allow-modals', 'allow-popups']
- title: Flux Comics
source: https://flux-framework.readthedocs.io/en/latest/comics/fluxonomicon.html
description: come and meet FluxBird - the pink bird who knows things!
type: url
catalog: Flux Resources
args:
sandbox: [ 'allow-same-origin', 'allow-scripts', 'allow-downloads', 'allow-modals', 'allow-popups']
- title: Flux Learning Guide
source: https://flux-framework.readthedocs.io/en/latest/guides/learning_guide.html
description: learn about what Flux does, how it works, and real research applications
type: url
catalog: Flux Resources
args:
sandbox: [ 'allow-same-origin', 'allow-scripts', 'allow-downloads', 'allow-modals', 'allow-popups']
- title: Getting Started with Flux and Go
source: https://converged-computing.github.io/flux-go
type: url
catalog: Flux Resources
args:
sandbox: [ 'allow-same-origin', 'allow-scripts', 'allow-downloads', 'allow-modals', 'allow-popups']
- title: Getting Started with Flux in C
source: https://converged-computing.github.io/flux-c-examples/
description: ...looking for contributors!
type: url
catalog: Flux Resources
args:
sandbox: [ 'allow-same-origin', 'allow-scripts', 'allow-downloads', 'allow-modals', 'allow-popups']
Loading