Address CSCS review feedback and add web deployment#220
Conversation
|
👋 Thank you for your contribution! This pull request is from a forked repository so GitHub Actions will not be able to run CI. A maintainer will review your changes shortly and manually trigger the CI. @maintainers Please review this PR when you have a chance and follow the instructions in the CONTRIBUTING.md file to trigger the CI. |
| ```bash | ||
| export CSCS_ACCOUNT="YOUR_ACCOUNT" | ||
| export ACH_STATE="${SCRATCH}/ach-pyhpc-web" | ||
| mkdir -p -m 700 "${ACH_STATE}" | ||
| umask 077 | ||
|
|
||
| cd "${ACH_REPO}" | ||
| JOB_ID=$(sbatch --parsable \ | ||
| --account="${CSCS_ACCOUNT}" --partition=normal --time=10:00:00 \ | ||
| --nodes=1 --ntasks=1 --gpus=1 --signal=B:TERM@60 \ | ||
| --job-name=ach-pyhpc-web \ | ||
| --chdir="${ACH_REPO}" --output="${ACH_STATE}/slurm-%j.log" \ | ||
| --export=ALL,ACH_REPO="${ACH_REPO}",ACH_STATE="${ACH_STATE}",ACH_BRANCH="${ACH_BRANCH}" \ | ||
| tutorials/pyhpc/brev/start-cscs-web.bash) | ||
| echo "JOB_ID=${JOB_ID}" | ||
| tail -F "${ACH_STATE}/slurm-${JOB_ID}.log" | ||
| ``` |
There was a problem hiding this comment.
It sounds like we should probably just have a script for doing the job launch, and the script should also check out the git repo.
If there is an existing repo, it should only update to top of trunk if the existing repo is on main and not dirty.
There was a problem hiding this comment.
Addressed in launch-cscs-web.bash: the launcher now owns checkout preparation. It clones the event branch when the checkout is absent and only changes an existing checkout when it is on main and completely clean, including untracked files. Dirty or non-main checkouts are left untouched; a separate managed release checkout supplies the deployment code.
There was a problem hiding this comment.
Final naming update: this behavior is now in cscs-launch-tutorial. It still clones when absent, only moves an existing clean main checkout, preserves dirty/non-main student checkouts, and uses a separate clean runtime checkout.
| ``` | ||
|
|
||
| Wait for `READY node=nidXXXXXX`, then copy that node name. `Ctrl-C` only stops | ||
| `tail`; it does not stop the job. The first launch takes several minutes while |
There was a problem hiding this comment.
Why did you put this note about ctrl-c here?
Are users required to ctrl-c (e.g. tail runs forever)?
I would prefer a script that completes after the node is ready.
There was a problem hiding this comment.
Addressed. The launcher waits for the Slurm job and all three services, prints CSCS_WEB_JOB_ID and CSCS_WEB_NODE, and then exits. There is no tail or required Ctrl-C; the workstation connector owns the long-lived SSH shell.
There was a problem hiding this comment.
Confirmed unchanged after the latest update: cscs-launch-tutorial returns once the job and all three services are ready; no tail or Ctrl-C step is involved.
| ```bash | ||
| export CSCS_USER="YOUR_CSCS_USERNAME" | ||
| export NODE="nidXXXXXX" | ||
|
|
||
| ssh -N \ | ||
| -o ExitOnForwardFailure=yes \ | ||
| -o ServerAliveInterval=30 -o ServerAliveCountMax=3 \ | ||
| -J "${CSCS_USER}@ela.cscs.ch,${CSCS_USER}@daint.alps.cscs.ch" \ | ||
| -L 127.0.0.1:8888:127.0.0.1:8888 \ | ||
| -L 127.0.0.1:8080:127.0.0.1:8080 \ | ||
| -L 127.0.0.1:3478:127.0.0.1:3478 \ | ||
| -L 127.0.0.1:8081:127.0.0.1:8081 \ | ||
| -L 127.0.0.1:3479:127.0.0.1:3479 \ | ||
| "${CSCS_USER}@${NODE}" |
There was a problem hiding this comment.
We should have three scripts total instead of embedded instructions here.
- One script that is run on the Daint headnode that launches the job, waits for it start, and reports the node ID.
- One script that is run from the workstation/browser with the browser that connects to the node with port forwarding and leaves the user in a shell on the node.
- One end-to-end script that you run from workstation/browser that SSHs to Daint (should be resilient to authentication/2FA issues), invokes script 1, and then invokes script 2 locally.
There was a problem hiding this comment.
Addressed with the three requested scripts: launch-cscs-web.bash launches/waits/reports on Daint, connect-cscs-web.bash opens the five forwards and an interactive compute-node shell, and run-cscs-web.bash performs the end-to-end workstation flow. The last opens one Daint ControlMaster before submission, retries once via cscs-key sign after public-key rejection, reuses that connection, and then invokes the connector locally.
There was a problem hiding this comment.
Final names in 3085f6b are cscs-launch-tutorial, cscs-connect-tutorial, and cscs-run-tutorial. The end-to-end helper uploads/invokes the launcher, then runs the connector through the same authenticated Daint control connection.
| The generated EDF sets `PMIX_MCA_gds=hash` and `PMIX_MCA_psec=native`, which | ||
| are the PMIx settings used for clean Slurm MPI runs on Daint. | ||
|
|
||
| ## Run JupyterLab and Nsight Streamer for 10 hours |
There was a problem hiding this comment.
The instructions should include instructions on how to setup SSH access to Daint from scratch on the user's workstation/laptop with the browser
There was a problem hiding this comment.
Added from-scratch workstation setup to docs/cscs.md: account/MFA prerequisites, cscs-key installation, key creation and signing, ssh-agent, ela/daint/nid* SSH configuration, file permissions, and an ssh daint hostname end-to-end test, with links to the official CSCS instructions.
There was a problem hiding this comment.
The final setup is now shorter and alias-free: docs/cscs.md has an exact pinned cscs-key install command plus key creation/signing. The helpers accept --user and route through ela.cscs.ch to daint.alps.cscs.ch directly, so no user SSH config is required.
|
Live Daint validation completed for
The repeated early Podman termination was traced with |
| CSCS does not support username/password SSH. If the certificate expires, run | ||
| `cscs-key sign` again; the private key does not need to be regenerated. See the | ||
| official [CSCS SSH instructions](https://docs.cscs.ch/access/ssh/) for account, | ||
| MFA, key-signing, and platform-specific installation details. |
There was a problem hiding this comment.
This is overengineered and too wordy. Make it simpler and more concise.
There was a problem hiding this comment.
Simplified in c236d3a. The setup is now just the exact cscs-key install command, key creation/signing, and the one launch command; the ssh-agent and user SSH-config instructions are gone.
|
|
||
| 1. Ensure the CSCS account belongs to a project with Daint access and has | ||
| [multi-factor authentication](https://docs.cscs.ch/access/mfa/) configured. | ||
| 2. Install [`cscs-key`](https://docs.cscs.ch/access/ssh/#command-line-access). |
There was a problem hiding this comment.
Provide an exact curl command for this.
There was a problem hiding this comment.
Added in c236d3a: the docs now install the pinned cscs-key v1.1.0 Linux binary with an exact curl-to-tar command into ${HOME}/.local/bin (plus the Homebrew command for macOS).
| Host ela | ||
| HostName ela.cscs.ch | ||
| User YOUR_CSCS_USERNAME | ||
| IdentityFile ~/.ssh/cscs-key | ||
| IdentitiesOnly yes |
There was a problem hiding this comment.
Why do I need this one?
There was a problem hiding this comment.
Removed in c236d3a. Users no longer need an Ela alias (or any SSH alias); the helpers construct the Ela-to-Daint route themselves using the real hostnames.
| Host nid* | ||
| User YOUR_CSCS_USERNAME | ||
| IdentityFile ~/.ssh/cscs-key | ||
| IdentitiesOnly yes |
There was a problem hiding this comment.
Removed in c236d3a. The workstation SSH config no longer needs a nid* block; cscs-connect-tutorial supplies the compute-node user and identity directly.
| used for student work; this lets the launcher preserve an older or modified | ||
| student checkout without running stale infrastructure from it. | ||
|
|
||
| Download the three web helpers from the event branch onto the workstation: |
There was a problem hiding this comment.
This should be ONE curl | bash that you run on the workstation.
There was a problem hiding this comment.
Changed in c236d3a to one curl | bash command. The streamed cscs-run-tutorial clones or fast-forwards the event branch under ${HOME}/accelerated-computing-hub, then launches and connects.
There was a problem hiding this comment.
Follow-up in 8445075: the final command is a no-argument curl | bash using cscs-run-tutorial.bash. It reads the username from the signed SSH certificate and lets Slurm select the default account. The NVIDIA event-branch URL will resolve once this PR is merged; the pushed fork/head raw URL currently returns 200.
| mkdir -p "${HOME}/ach-cscs-web" | ||
| cd "${HOME}/ach-cscs-web" |
There was a problem hiding this comment.
This is a bad directory name. It should just be ${HOME}/accelerated-computing-hub
There was a problem hiding this comment.
Changed in c236d3a. The workstation checkout is now exactly ${HOME}/accelerated-computing-hub.
| This is the recommended path from the workstation: | ||
|
|
||
| ```bash | ||
| ./run-cscs-web.bash --account YOUR_CSCS_ACCOUNT |
There was a problem hiding this comment.
This script should not assume that the user has an SSH alias called daint, but it can assume that the user has already setup keys.
There was a problem hiding this comment.
Fixed in c236d3a. The scripts do not read or require a daint alias. They accept --user, use the configured key (default ${HOME}/.ssh/cscs-key), and build a private Ela-to-Daint route with ela.cscs.ch and daint.alps.cscs.ch.
| cd "${HOME}/ach-cscs-web" | ||
| BASE_URL="https://raw.githubusercontent.com/NVIDIA/accelerated-computing-hub/event/2026-07-cscs-summer-school/tutorials/pyhpc/brev" | ||
| for SCRIPT in launch-cscs-web.bash connect-cscs-web.bash run-cscs-web.bash; do | ||
| curl --fail --location --remote-name "${BASE_URL}/${SCRIPT}" |
There was a problem hiding this comment.
I don't like these script names. It should be cscs-launch-tutorial, cscs-connect-tutorial, cscs-run-tutorial.
There was a problem hiding this comment.
Renamed exactly as requested in c236d3a: cscs-launch-tutorial, cscs-connect-tutorial, and cscs-run-tutorial. All documentation and inter-script references use the new names.
There was a problem hiding this comment.
Follow-up in 8445075: per the latest request, all three filenames now include the suffix: cscs-launch-tutorial.bash, cscs-connect-tutorial.bash, and cscs-run-tutorial.bash. Bootstrap, upload, sibling lookup, usage, and docs all match.
Summary
This PR deliberately targets
event/2026-07-cscs-summer-school; merging it updates the event branch reviewed by #215.Live Daint validation
Tested from this node against Daint job
4258261onnid006001using the GitHub-CI PyHPC image and pinned NVIDIA Streamer images:$SCRATCHcheckoutTERMcleanup removed containers, listeners, private TLS/TURN state, and job-local image stores while preserving student workValidation
nsightand isolated NCU ports/display