Skip to content

feat: add Brev Launchable provisioning script - #687

Merged
zywind merged 10 commits into
mainfrom
zywind/376-brev-launchable
Aug 4, 2026
Merged

feat: add Brev Launchable provisioning script#687
zywind merged 10 commits into
mainfrom
zywind/376-brev-launchable

Conversation

@zywind

@zywind zywind commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a one-click NVIDIA Brev Launchable so someone can try
NeMo Safe Synthesizer on a provisioned GPU instance with no local CUDA, driver, or
Python setup, and links it from the README and docs.

File Purpose
script/brev/setup.sh Pasted into the Launchable's Setup Script field. Installs the cu129 build into a dedicated venv, registers it as the default Jupyter kernel, and fetches the tutorial notebooks.
script/brev/welcome.md Becomes the user's $HOME/README.md.
script/brev/README.md Records the console configuration, which otherwise lives only in the Brev web UI, plus the constraints found while testing on real instances.
README.md, docs/ Launch badge on the four pages someone lands on before deciding to install.

Uses VM Mode rather than Single Container: the published GHCR image has no Jupyter layer
and its entrypoint is the CLI. Container mode is the better long-term shape and is
tracked separately.

Notes for reviewers

  • Nothing here is executed by the repo or CI -- setup.sh is copy-pasted into a web
    form. Brev caps it at 16 KiB; it is currently 16,067 bytes.
  • Package index URLs are derived at runtime from the installed release's own
    pyproject.toml rather than hardcoded, so they cannot drift from the wheel. Selection
    is keyed on the URL, not the index name -- flashinfer's entry was renamed between
    0.1.8 and 0.1.9.
  • script/brev/README.md explains the rest of the non-obvious decisions. Each was found
    by a failed deploy, so please read it before simplifying anything in the script.

Testing

Verified on a live Brev instance (Shadeform-brokered H100 PCIe 80 GiB): unprivileged
uv install, venv creation, the full [cu129,engine] resolve and install, and tutorial
fetch. mkdocs build --strict passes for the docs changes.

Not yet verified on an instance: kernel registration, the smoke checks, the
setup-in-progress placeholder, and the generated README.md.

Other Notes

Summary by CodeRabbit

  • New Features

    • Added a preconfigured Brev GPU launch experience for NeMo Safe Synthesizer.
    • Added automated environment setup, tutorial notebooks, validation checks, progress reporting, and Jupyter kernel registration.
    • Added a welcome guide covering notebooks, custom CSV usage, environment details, and setup troubleshooting.
  • Documentation

    • Added Brev launch links and setup guidance across the Quick Start, tutorials, and getting-started documentation.
    • Documented GPU requirements, estimated runtime, billing considerations, and instance deletion requirements.

@zywind
zywind requested a review from a team as a code owner July 30, 2026 19:08
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Changes

The PR adds Brev launch documentation and an idempotent provisioning script. It installs the pinned runtime, stages tutorials, configures environment variables and a Jupyter kernel, runs smoke checks, and publishes a welcome guide.

Brev provisioning hardening

Layer / File(s) Summary
Launchable documentation and setup contract
script/brev/README.md, script/brev/setup.sh, README.md, docs/index.md, docs/tutorials/index.md, docs/user-guide/getting-started.md
Documents Brev configuration, launch parameters, provisioning behavior, verification steps, tested GPU configurations, and launch instructions across the project documentation. The script adds strict execution, progress tracking, failure handling, and optional GPU reporting.
Runtime and tutorial provisioning
script/brev/setup.sh
Installs checksum-verified uv, creates the pinned Python 3.13 environment, installs Safe Synthesizer and notebook dependencies, stages tutorials, and writes restricted environment configuration.
Jupyter kernel registration
script/brev/setup.sh
Creates the Safe Synthesizer kernelspec, selects writable kernel directories, preserves an existing kernel once, and reports registration warnings.
Validation and customer handoff
script/brev/setup.sh, script/brev/welcome.md
Runs version and CUDA smoke checks, publishes the welcome guide, removes the setup marker, and reports completion paths.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested labels: feature

Suggested reviewers: binaryaaron

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a Brev Launchable provisioning script.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch zywind/376-brev-launchable

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the feature New feature or request label Jul 30, 2026
Comment thread script/brev/setup.sh
Comment thread script/brev/setup.sh Outdated
Comment thread script/brev/setup.sh
@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a one-click Brev GPU environment for evaluating NeMo Safe Synthesizer.

  • Provisions a dedicated CUDA-enabled Python environment with verified tooling, notebook support, tutorial content, and a default Jupyter kernel.
  • Makes interrupted package and tutorial setup safely retryable.
  • Adds launch links, billing guidance, operational documentation, and a welcome page across the project documentation.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the current retry guards repair incomplete notebook support and tutorial extraction, while the pinned uv artifact is checked against its published checksum before installation.

Important Files Changed

Filename Overview
script/brev/setup.sh Adds idempotent Brev provisioning with checksum-verified uv installation, isolated package setup, atomic tutorial extraction, and Jupyter kernel registration; the previously reported retry and integrity issues are addressed.
script/brev/README.md Documents Brev console settings, operational constraints, implementation decisions, and validation procedures.
script/brev/welcome.md Adds the provisioned instance’s user-facing getting-started and lifecycle guidance.
README.md Adds the Brev launch badge and continuous-billing warning to the project quick start.
docs/index.md Adds a Brev evaluation path, expected tutorial runtime, and instance deletion guidance.
docs/tutorials/index.md Advertises the preconfigured GPU tutorial environment and its billing lifecycle.
docs/user-guide/getting-started.md Adds Brev as an alternative to local package and CUDA installation.

Sequence Diagram

sequenceDiagram
    participant User
    participant Brev
    participant Setup as setup.sh
    participant GitHub
    participant PyPI
    participant Jupyter
    User->>Brev: Launch GPU instance
    Brev->>Setup: Run provisioning script
    Setup->>GitHub: Download and verify pinned uv release
    Setup->>PyPI: Resolve Safe Synthesizer release
    Setup->>GitHub: Read release indexes and fetch tutorials
    Setup->>Setup: Install CUDA package and notebook support
    Setup->>Jupyter: Register Safe Synthesizer kernel
    Setup-->>User: Publish README and tutorials
Loading

Reviews (9): Last reviewed commit: "fix(brev): harden CUDA index discovery" | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (1)
script/brev/setup.sh (1)

76-82: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Consider downloading the uv installer before executing it.

Piping curl straight into sh (flagged by static analysis, CWE-494) means a compromised/MITM'd astral.sh response executes immediately with no chance to inspect it. astral's own docs offer curl ... | less as an inspection step before running, and the URL is already version-pinned here, so splitting download from execution is a low-cost hardening step consistent with the path instructions' call to review dependency/tooling scripts for supply-chain risk.

🔒 Proposed fix: download then execute
-  curl -LsSf "https://astral.sh/uv/${UV_VERSION}/install.sh" \
-    | env UV_INSTALL_DIR="${BIN_DIR}" INSTALLER_NO_MODIFY_PATH=1 sh
+  uv_installer="$(mktemp)"
+  curl -LsSf "https://astral.sh/uv/${UV_VERSION}/install.sh" -o "${uv_installer}"
+  env UV_INSTALL_DIR="${BIN_DIR}" INSTALLER_NO_MODIFY_PATH=1 sh "${uv_installer}"
+  rm -f "${uv_installer}"

Sources: Path instructions, Linters/SAST tools


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2aa96fa5-3e92-4414-81ac-4979df077987

📥 Commits

Reviewing files that changed from the base of the PR and between ce2f07c and d3a8f3f.

📒 Files selected for processing (2)
  • script/brev/README.md
  • script/brev/setup.sh
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: Greptile Review
  • GitHub Check: Analyze (Python)
  • GitHub Check: Analyze (python)
🧰 Additional context used
📓 Path-based instructions (10)
**/*.{md,markdown,py}

📄 CodeRabbit inference engine (.cursor/rules/agent-markdown-style.mdc)

**/*.{md,markdown,py}: Avoid decorative bold (**text**) in list items, body text, and docstrings; use structural cues (headers, list markers, colons, backticks) for emphasis instead
Use backticks for code identifiers, paths, and CLI commands in markdown and docstrings

Files:

  • script/brev/README.md
**/*.{md,markdown}

📄 CodeRabbit inference engine (.cursor/rules/agent-markdown-style.mdc)

**/*.{md,markdown}: Bold is acceptable only in markdown tables where it's the conventional way to mark header-like cells in the body
Use ## headers to segment markdown sections instead of bold text
Use -- (em-dash) instead of - (hyphen) for asides in markdown

Files:

  • script/brev/README.md
**/*.md

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

Do not use decorative bold in Markdown body text, list items, or docstrings; use single backticks for code identifiers, paths, and commands.

Files:

  • script/brev/README.md
**/*

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*: Every source file requires the SPDX copyright and license header appropriate to its file format.
End files with a newline, remove trailing whitespace, use one space between sentences, and keep code, comments, and docstrings within 120 characters.

**/*: All contributions must use verified Git commits and DCO sign-off; unsigned or unsigned-off commits cannot be merged.
Branches other than main must follow <author>/<description>, optionally including an issue ID or type; branch names must use lowercase alphanumeric characters and hyphens.
Commits merged to main must follow Conventional Commits, using a valid lowercase type and a description of at most 100 characters.

Files:

  • script/brev/README.md
  • script/brev/setup.sh

⚙️ CodeRabbit configuration file

**/*: Review as a senior maintainer for NeMo Safe Synthesizer. Prioritize issues that can change behavior, break user workflows, weaken privacy guarantees, hide failures, make tests unreliable, or create maintenance risk. Avoid generic style commentary unless it points to a concrete project convention that automated tools will not catch.
Comment only when the finding is actionable and tied to changed code. For each finding, state the impact, the condition that triggers it, and the smallest practical fix. Prefer one precise comment over broad advice. Do not ask for refactors outside the PR scope unless the changed code creates the problem.
Review type guidance: - Potential issue: use for correctness bugs, data loss, privacy leaks,
security risks, broken public APIs, invalid config behavior, missing
validation, hidden failures, nondeterministic tests, or CI breakage.

  • Refactor suggestion: use for local maintainability problems introduced
    by the diff when they have clear future cost, such as duplicated setup,
    unclear boundaries, over-mocking, avoidable complexity, or opaque test
    helpers.
  • Nitpick: avoid in chill mode. Do not emit formatting, import-order,
    wording, or style-only comments unless automated tools cannot catch the
    issue and it affects maintainability.

Severity guidance: - Critical: security/privacy leaks, data loss, training/test/holdout
contamination, or broken release/package/core pipeline execution.

  • Major: incorrect generation/training/evaluation behavior, broken
    CLI/SDK public API, invalid config defaults or validators, or GPU/vLLM
    cleanup and process-isolation bugs likely to fail CI or production
    runs.
  • Minor: localized bugs, missing focused tests for changed behavior, or
    bad test patterns that weaken regression coverage.
  • Trivial: small cleanup with no behavior impact. Usually suppress in
    chill mode.
  • Info: context only. Avoid unless it helps reviewers understand risk.
    Safe-Synthesizer-specific review focus: - Data ...

Files:

  • script/brev/README.md
  • script/brev/setup.sh
**/*.{py,sh,yaml,yml,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

All Python, shell, YAML, YML, and Markdown source files require SPDX copyright headers.

Files:

  • script/brev/README.md
  • script/brev/setup.sh
**/*.{py,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use the repository's documented Python and Markdown style conventions and validate changes with the pinned mise formatting and checking tasks.

Files:

  • script/brev/README.md
script/**

⚙️ CodeRabbit configuration file

Review standalone scripts for reproducibility and operational safety. Check argument validation, quoting, repo-root detection, environment variables, generated artifacts, external commands, GPU/cluster assumptions, and whether the script should be wired through Makefile or documented in README/docs.

Files:

  • script/brev/README.md
  • script/brev/setup.sh
**/*.{sh,bash}

📄 CodeRabbit inference engine (AGENTS.md)

Never use ~ inside double-quoted strings in shell scripts -- use $HOME or an absolute path instead

Files:

  • script/brev/setup.sh
**/*.{py,sh}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use the repository's pinned mise tasks for formatting, linting, type checking, and testing rather than invoking ruff or ty directly for project-wide checks.

Files:

  • script/brev/setup.sh
**/*.sh

⚙️ CodeRabbit configuration file

Review shell scripts for #!/usr/bin/env bash, set -euo pipefail where appropriate, quoting, repo root detection, and shellcheck compliance.

Files:

  • script/brev/setup.sh
🪛 ast-grep (0.45.0)
script/brev/setup.sh

[error] 77-78: Remote content fetched with curl/wget is piped directly into a shell interpreter, so any server compromise, MITM, or tampered mirror results in arbitrary code execution on this host. Download the script to a file first, verify its integrity (checksum/signature) and inspect it, then run the verified local copy.
Context: curl -LsSf "https://astral.sh/uv/${UV_VERSION}/install.sh"
| env UV_INSTALL_DIR="${BIN_DIR}" INSTALLER_NO_MODIFY_PATH=1 sh
Note: [CWE-494] Download of Code Without Integrity Check.

(curl-pipe-to-shell-bash)

🪛 LanguageTool
script/brev/README.md

[style] ~55-~55: Consider using a shorter alternative to avoid wordiness.
Context: ...oves the model download earlier without making it shorter, while hiding the progress bar the note...

(MADE_IT_JJR)

🪛 markdownlint-cli2 (0.23.1)
script/brev/README.md

[warning] 4-4: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🔇 Additional comments (1)
script/brev/setup.sh (1)

1-345: Otherwise solid: idempotency checks, secret handling, and the tutorial-ref fallback logic are all well thought out. No further issues beyond the two flagged above.

Comment thread script/brev/README.md
Comment thread script/brev/README.md Outdated
Comment thread script/brev/README.md Outdated
Comment thread script/brev/README.md Outdated
Comment thread script/brev/README.md Outdated
Comment thread script/brev/setup.sh
@coderabbitai coderabbitai Bot added the security Security-relevant fix or hardening label Jul 30, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
script/brev/setup.sh (1)

296-300: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Do not overwrite a kernelspec when its backup failed.

If Line 298 fails (for example, due to an I/O error), || true discards it and Line 300 replaces the only recoverable original. Log the failure and continue to the next target instead.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a47bae50-b2c1-4cbd-8f75-b92654df3dc7

📥 Commits

Reviewing files that changed from the base of the PR and between d3a8f3f and 6037b7c.

📒 Files selected for processing (2)
  • script/brev/README.md
  • script/brev/setup.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • script/brev/README.md
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: CI Status
  • GitHub Check: Greptile Review
  • GitHub Check: Analyze (Python)
  • GitHub Check: Analyze (python)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{sh,bash}

📄 CodeRabbit inference engine (AGENTS.md)

Never use ~ inside double-quoted strings in shell scripts -- use $HOME or an absolute path instead

Files:

  • script/brev/setup.sh
**/*

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*: Every source file requires the SPDX copyright and license header appropriate to its file format.
End files with a newline, remove trailing whitespace, use one space between sentences, and keep code, comments, and docstrings within 120 characters.

**/*: All contributions must use verified Git commits and DCO sign-off; unsigned or unsigned-off commits cannot be merged.
Branches other than main must follow <author>/<description>, optionally including an issue ID or type; branch names must use lowercase alphanumeric characters and hyphens.
Commits merged to main must follow Conventional Commits, using a valid lowercase type and a description of at most 100 characters.

Files:

  • script/brev/setup.sh

⚙️ CodeRabbit configuration file

**/*: Review as a senior maintainer for NeMo Safe Synthesizer. Prioritize issues that can change behavior, break user workflows, weaken privacy guarantees, hide failures, make tests unreliable, or create maintenance risk. Avoid generic style commentary unless it points to a concrete project convention that automated tools will not catch.
Comment only when the finding is actionable and tied to changed code. For each finding, state the impact, the condition that triggers it, and the smallest practical fix. Prefer one precise comment over broad advice. Do not ask for refactors outside the PR scope unless the changed code creates the problem.
Review type guidance: - Potential issue: use for correctness bugs, data loss, privacy leaks,
security risks, broken public APIs, invalid config behavior, missing
validation, hidden failures, nondeterministic tests, or CI breakage.

  • Refactor suggestion: use for local maintainability problems introduced
    by the diff when they have clear future cost, such as duplicated setup,
    unclear boundaries, over-mocking, avoidable complexity, or opaque test
    helpers.
  • Nitpick: avoid in chill mode. Do not emit formatting, import-order,
    wording, or style-only comments unless automated tools cannot catch the
    issue and it affects maintainability.

Severity guidance: - Critical: security/privacy leaks, data loss, training/test/holdout
contamination, or broken release/package/core pipeline execution.

  • Major: incorrect generation/training/evaluation behavior, broken
    CLI/SDK public API, invalid config defaults or validators, or GPU/vLLM
    cleanup and process-isolation bugs likely to fail CI or production
    runs.
  • Minor: localized bugs, missing focused tests for changed behavior, or
    bad test patterns that weaken regression coverage.
  • Trivial: small cleanup with no behavior impact. Usually suppress in
    chill mode.
  • Info: context only. Avoid unless it helps reviewers understand risk.
    Safe-Synthesizer-specific review focus: - Data ...

Files:

  • script/brev/setup.sh
**/*.{py,sh,yaml,yml,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

All Python, shell, YAML, YML, and Markdown source files require SPDX copyright headers.

Files:

  • script/brev/setup.sh
**/*.{py,sh}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use the repository's pinned mise tasks for formatting, linting, type checking, and testing rather than invoking ruff or ty directly for project-wide checks.

Files:

  • script/brev/setup.sh
script/**

⚙️ CodeRabbit configuration file

Review standalone scripts for reproducibility and operational safety. Check argument validation, quoting, repo-root detection, environment variables, generated artifacts, external commands, GPU/cluster assumptions, and whether the script should be wired through Makefile or documented in README/docs.

Files:

  • script/brev/setup.sh
**/*.sh

⚙️ CodeRabbit configuration file

Review shell scripts for #!/usr/bin/env bash, set -euo pipefail where appropriate, quoting, repo root detection, and shellcheck compliance.

Files:

  • script/brev/setup.sh
🔇 Additional comments (3)
script/brev/setup.sh (3)

34-34: LGTM!

Also applies to: 78-101


153-177: LGTM!


288-295: LGTM!

Comment thread script/brev/setup.sh Outdated
@coderabbitai coderabbitai Bot removed the security Security-relevant fix or hardening label Jul 30, 2026

@kendrickb-nvidia kendrickb-nvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is excellent to get a brev launchable going. I think we can do a followup on how to handle versioning and changes for installation and notebooks. E.g., right now we sort of can't update notebooks to address SDK changes cause it would break the launchable unless we update the notebook at the exact same time we make the new release.

Comment thread script/brev/setup.sh Outdated
Comment thread script/brev/setup.sh Outdated
zywind and others added 5 commits August 3, 2026 12:51
Provision a Brev VM-Mode Launchable that gives a customer a ready-to-run
JupyterLab with Safe Synthesizer installed, so trying NSS needs no local
CUDA, driver, or Python setup.

setup.sh is pasted into the Launchable's Setup Script field. It installs
the cu129 build into a dedicated venv, registers that venv as the default
Jupyter kernel, fetches the tutorial notebooks, and writes a short README
into $HOME. README.md records the console configuration, which otherwise
lives only in the Brev web UI, plus the non-obvious constraints found
while testing on real instances.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Yunfeng Zhang <yunzhang@nvidia.com>
Idempotency: check ipykernel separately from the package install, so a rerun
after a failed notebook-support step does not skip it and leave a registered
kernel that cannot start. Stage the tutorial extract in a temp directory and
move it into place only on success, so a partial extract is never mistaken
for a complete one.

Kernel registration: mkdir -p succeeds on an existing directory the user
cannot write, so the unguarded cp that followed would abort the whole run
under set -e instead of falling through to the next target. Test writability
and guard the copies.

uv install: fetch the release tarball and verify its published SHA-256
instead of piping astral.sh/install.sh into a shell, which reports "no
checksums to verify". Matches the GPG-verified mise install in
tools/install-mise.sh.

Docs: correct "clones" to "downloads", restore the leading dots on
.nss-setup.log and .nss-venv, narrow the tested-configurations row to what
actually ran, and drop decorative bold per STYLE_GUIDE.md.

Signed-off-by: Yunfeng Zhang <yunzhang@nvidia.com>
Checking only ipykernel would skip the install when ipywidgets is the
missing one, leaving notebook support incomplete.

Signed-off-by: Yunfeng Zhang <yunzhang@nvidia.com>
The three index URLs were hardcoded, so they tracked this repo's main while
the script installed whatever was latest on PyPI. Index URLs are install-time
configuration rather than wheel metadata, so they must match the release being
installed; nothing kept the two in step.

Resolve the latest version from the PyPI JSON API, read the CUDA index URLs
from that tag's pyproject.toml, and pin the install to that exact version.

Select indexes by URL rather than by index name: the flashinfer entry was
renamed flashinfer-jit-cache -> flashinfer-jit-cache-cu129 between 0.1.8 and
0.1.9, so a name-keyed lookup would have silently found only two of three.

Signed-off-by: Yunfeng Zhang <yunzhang@nvidia.com>
…a file

JupyterLab accepts connections well before provisioning finishes, so a user
who opens it early saw an empty or half-populated file browser with no
explanation. Write SETUP-IN-PROGRESS.md before any slow work, rewrite it from
the ERR trap if provisioning fails, and replace it with README.md on success.

Move the customer-facing welcome text out of a heredoc into welcome.md,
fetched from the same tarball as the tutorials so the two always match. The
heredoc was ~1.6 KiB of the 16 KiB Brev allows for the setup script; deriving
indexes at runtime had pushed the file over that limit.

Signed-off-by: Yunfeng Zhang <yunzhang@nvidia.com>
@zywind
zywind force-pushed the zywind/376-brev-launchable branch from 828cef3 to 454d736 Compare August 3, 2026 17:30
@coderabbitai coderabbitai Bot added the security Security-relevant fix or hardening label Aug 3, 2026
Comment thread script/brev/setup.sh Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 782f7c82-8a8d-426b-ad32-57ef87f061ab

📥 Commits

Reviewing files that changed from the base of the PR and between 828cef3 and 454d736.

📒 Files selected for processing (3)
  • script/brev/README.md
  • script/brev/setup.sh
  • script/brev/welcome.md
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: Analyze (Python)
  • GitHub Check: Greptile Review
  • GitHub Check: Typecheck
  • GitHub Check: Analyze (python)
🧰 Additional context used
📓 Path-based instructions (10)
**/*.{md,markdown,py}

📄 CodeRabbit inference engine (.cursor/rules/agent-markdown-style.mdc)

**/*.{md,markdown,py}: Avoid decorative bold (**text**) in list items, body text, and docstrings; use structural cues (headers, list markers, colons, backticks) for emphasis instead
Use backticks for code identifiers, paths, and CLI commands in markdown and docstrings

Files:

  • script/brev/welcome.md
  • script/brev/README.md
**/*.{md,markdown}

📄 CodeRabbit inference engine (.cursor/rules/agent-markdown-style.mdc)

**/*.{md,markdown}: Bold is acceptable only in markdown tables where it's the conventional way to mark header-like cells in the body
Use ## headers to segment markdown sections instead of bold text
Use -- (em-dash) instead of - (hyphen) for asides in markdown

Files:

  • script/brev/welcome.md
  • script/brev/README.md
**/*.md

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

Do not use decorative bold in Markdown body text, list items, or docstrings; use single backticks for code identifiers, paths, and commands.

Files:

  • script/brev/welcome.md
  • script/brev/README.md
**/*

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*: Every source file requires the SPDX copyright and license header appropriate to its file format.
End files with a newline, remove trailing whitespace, use one space between sentences, and keep code, comments, and docstrings within 120 characters.

**/*: All contributions must use verified Git commits and DCO sign-off; unsigned or unsigned-off commits cannot be merged.
Branches other than main must follow <author>/<description>, optionally including an issue ID or type; branch names must use lowercase alphanumeric characters and hyphens.
Commits merged to main must follow Conventional Commits, using a valid lowercase type and a description of at most 100 characters.

Files:

  • script/brev/welcome.md
  • script/brev/README.md
  • script/brev/setup.sh

⚙️ CodeRabbit configuration file

**/*: Review as a senior maintainer for NeMo Safe Synthesizer. Prioritize issues that can change behavior, break user workflows, weaken privacy guarantees, hide failures, make tests unreliable, or create maintenance risk. Avoid generic style commentary unless it points to a concrete project convention that automated tools will not catch.
Comment only when the finding is actionable and tied to changed code. For each finding, state the impact, the condition that triggers it, and the smallest practical fix. Prefer one precise comment over broad advice. Do not ask for refactors outside the PR scope unless the changed code creates the problem.
Review type guidance: - Potential issue: use for correctness bugs, data loss, privacy leaks,
security risks, broken public APIs, invalid config behavior, missing
validation, hidden failures, nondeterministic tests, or CI breakage.

  • Refactor suggestion: use for local maintainability problems introduced
    by the diff when they have clear future cost, such as duplicated setup,
    unclear boundaries, over-mocking, avoidable complexity, or opaque test
    helpers.
  • Nitpick: avoid in chill mode. Do not emit formatting, import-order,
    wording, or style-only comments unless automated tools cannot catch the
    issue and it affects maintainability.

Severity guidance: - Critical: security/privacy leaks, data loss, training/test/holdout
contamination, or broken release/package/core pipeline execution.

  • Major: incorrect generation/training/evaluation behavior, broken
    CLI/SDK public API, invalid config defaults or validators, or GPU/vLLM
    cleanup and process-isolation bugs likely to fail CI or production
    runs.
  • Minor: localized bugs, missing focused tests for changed behavior, or
    bad test patterns that weaken regression coverage.
  • Trivial: small cleanup with no behavior impact. Usually suppress in
    chill mode.
  • Info: context only. Avoid unless it helps reviewers understand risk.
    Safe-Synthesizer-specific review focus: - Data ...

Files:

  • script/brev/welcome.md
  • script/brev/README.md
  • script/brev/setup.sh
**/*.{py,sh,yaml,yml,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

All Python, shell, YAML, YML, and Markdown source files require SPDX copyright headers.

Files:

  • script/brev/welcome.md
  • script/brev/README.md
  • script/brev/setup.sh
**/*.{py,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use the repository's documented Python and Markdown style conventions and validate changes with the pinned mise formatting and checking tasks.

Files:

  • script/brev/welcome.md
  • script/brev/README.md
script/**

⚙️ CodeRabbit configuration file

Review standalone scripts for reproducibility and operational safety. Check argument validation, quoting, repo-root detection, environment variables, generated artifacts, external commands, GPU/cluster assumptions, and whether the script should be wired through Makefile or documented in README/docs.

Files:

  • script/brev/welcome.md
  • script/brev/README.md
  • script/brev/setup.sh
**/*.{sh,bash}

📄 CodeRabbit inference engine (AGENTS.md)

Never use ~ inside double-quoted strings in shell scripts -- use $HOME or an absolute path instead

Files:

  • script/brev/setup.sh
**/*.{py,sh}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use the repository's pinned mise tasks for formatting, linting, type checking, and testing rather than invoking ruff or ty directly for project-wide checks.

Files:

  • script/brev/setup.sh
**/*.sh

⚙️ CodeRabbit configuration file

Review shell scripts for #!/usr/bin/env bash, set -euo pipefail where appropriate, quoting, repo root detection, and shellcheck compliance.

Files:

  • script/brev/setup.sh
🧠 Learnings (1)
📚 Learning: 2026-07-30T19:49:45.268Z
Learnt from: zywind
Repo: NVIDIA-NeMo/Safe-Synthesizer PR: 687
File: script/brev/README.md:4-4
Timestamp: 2026-07-30T19:49:45.268Z
Learning: For Brev and Slurm provisioning documentation README files under `script/`, allow the README to start with a level-three Markdown heading (e.g., `###`) to match the repo’s local convention. When reviewing, do not flag the heading level by default against markdownlint MD041 unless the repository’s `.markdownlint.json` explicitly enables MD041 (in this repo it is not enforced), since the heading level is an accepted local style choice.

Applied to files:

  • script/brev/README.md
🪛 LanguageTool
script/brev/README.md

[style] ~58-~58: Consider using a shorter alternative to avoid wordiness.
Context: ...oves the model download earlier without making it shorter, while hiding the progress bar the note...

(MADE_IT_JJR)

🪛 markdownlint-cli2 (0.23.1)
script/brev/README.md

[warning] 4-4: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🔇 Additional comments (7)
script/brev/README.md (1)

1-190: LGTM!

script/brev/setup.sh (5)

1-46: LGTM!


48-137: LGTM!


183-250: LGTM!


252-406: LGTM!


148-174: 🩺 Stability & Availability

Remove the main fallback request.

The release workflow starts from an existing v* tag and publishes to PyPI before creating the GitHub release. The corresponding tag therefore exists when the version becomes available on PyPI.

			> Likely an incorrect or invalid review comment.
script/brev/welcome.md (1)

1-50: LGTM!

Comment thread script/brev/README.md Outdated
Links the published Launchable so a reader can try Safe Synthesizer on a
provisioned GPU instance without a local CUDA, driver, or Python setup.

Placed on the README Quick Start, the docs landing page, the Getting Started
install section, and the tutorials index -- the four places someone lands
before deciding whether to install.

The README uses a <picture> element so the badge follows GitHub's theme; the
docs use Material's #only-light / #only-dark suffixes for the same reason.
Each mention states that the instance bills continuously and cannot be paused,
since most Brev providers do not support stopping one.

Signed-off-by: Yunfeng Zhang <yunzhang@nvidia.com>
@coderabbitai coderabbitai Bot removed the security Security-relevant fix or hardening label Aug 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1699d7a3-6553-455f-b276-3fa139c95c93

📥 Commits

Reviewing files that changed from the base of the PR and between 454d736 and b505549.

📒 Files selected for processing (4)
  • README.md
  • docs/index.md
  • docs/tutorials/index.md
  • docs/user-guide/getting-started.md
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: Analyze (Python)
  • GitHub Check: Typecheck
  • GitHub Check: Greptile Review
  • GitHub Check: Analyze (python)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{md,markdown,py}

📄 CodeRabbit inference engine (.cursor/rules/agent-markdown-style.mdc)

**/*.{md,markdown,py}: Avoid decorative bold (**text**) in list items, body text, and docstrings; use structural cues (headers, list markers, colons, backticks) for emphasis instead
Use backticks for code identifiers, paths, and CLI commands in markdown and docstrings

Files:

  • docs/user-guide/getting-started.md
  • README.md
  • docs/index.md
  • docs/tutorials/index.md
**/*.{md,markdown}

📄 CodeRabbit inference engine (.cursor/rules/agent-markdown-style.mdc)

**/*.{md,markdown}: Bold is acceptable only in markdown tables where it's the conventional way to mark header-like cells in the body
Use ## headers to segment markdown sections instead of bold text
Use -- (em-dash) instead of - (hyphen) for asides in markdown

Files:

  • docs/user-guide/getting-started.md
  • README.md
  • docs/index.md
  • docs/tutorials/index.md
docs/**/*.md

📄 CodeRabbit inference engine (.cursor/rules/writing-docs.mdc)

docs/**/*.md: Use MkDocs Material admonition syntax (!!! note, !!! warning, ??? tip) for highlighting important information and collapsible sections in documentation
Use MkDocs Material tabs syntax (=== "Label") to present alternative views or language-specific examples in documentation
Use code block syntax with title and highlight line parameters (title="filename", hl_lines="2 3") for code examples in documentation
Use Mermaid diagram syntax (```mermaid flowchart, etc.) for visualizations in documentation

Classify documentation using Diátaxis and use MkDocs Material syntax for admonitions, tabs, and titled or highlighted code blocks.

Documentation pages must be placed under the appropriate Diátaxis directory and added to the nav section of mkdocs.yml.

Files:

  • docs/user-guide/getting-started.md
  • docs/index.md
  • docs/tutorials/index.md
**/*.md

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

Do not use decorative bold in Markdown body text, list items, or docstrings; use single backticks for code identifiers, paths, and commands.

Files:

  • docs/user-guide/getting-started.md
  • README.md
  • docs/index.md
  • docs/tutorials/index.md
**/*

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*: Every source file requires the SPDX copyright and license header appropriate to its file format.
End files with a newline, remove trailing whitespace, use one space between sentences, and keep code, comments, and docstrings within 120 characters.

**/*: All contributions must use verified Git commits and DCO sign-off; unsigned or unsigned-off commits cannot be merged.
Branches other than main must follow <author>/<description>, optionally including an issue ID or type; branch names must use lowercase alphanumeric characters and hyphens.
Commits merged to main must follow Conventional Commits, using a valid lowercase type and a description of at most 100 characters.

Files:

  • docs/user-guide/getting-started.md
  • README.md
  • docs/index.md
  • docs/tutorials/index.md

⚙️ CodeRabbit configuration file

**/*: Review as a senior maintainer for NeMo Safe Synthesizer. Prioritize issues that can change behavior, break user workflows, weaken privacy guarantees, hide failures, make tests unreliable, or create maintenance risk. Avoid generic style commentary unless it points to a concrete project convention that automated tools will not catch.
Comment only when the finding is actionable and tied to changed code. For each finding, state the impact, the condition that triggers it, and the smallest practical fix. Prefer one precise comment over broad advice. Do not ask for refactors outside the PR scope unless the changed code creates the problem.
Review type guidance: - Potential issue: use for correctness bugs, data loss, privacy leaks,
security risks, broken public APIs, invalid config behavior, missing
validation, hidden failures, nondeterministic tests, or CI breakage.

  • Refactor suggestion: use for local maintainability problems introduced
    by the diff when they have clear future cost, such as duplicated setup,
    unclear boundaries, over-mocking, avoidable complexity, or opaque test
    helpers.
  • Nitpick: avoid in chill mode. Do not emit formatting, import-order,
    wording, or style-only comments unless automated tools cannot catch the
    issue and it affects maintainability.

Severity guidance: - Critical: security/privacy leaks, data loss, training/test/holdout
contamination, or broken release/package/core pipeline execution.

  • Major: incorrect generation/training/evaluation behavior, broken
    CLI/SDK public API, invalid config defaults or validators, or GPU/vLLM
    cleanup and process-isolation bugs likely to fail CI or production
    runs.
  • Minor: localized bugs, missing focused tests for changed behavior, or
    bad test patterns that weaken regression coverage.
  • Trivial: small cleanup with no behavior impact. Usually suppress in
    chill mode.
  • Info: context only. Avoid unless it helps reviewers understand risk.
    Safe-Synthesizer-specific review focus: - Data ...

Files:

  • docs/user-guide/getting-started.md
  • README.md
  • docs/index.md
  • docs/tutorials/index.md
**/*.{py,sh,yaml,yml,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

All Python, shell, YAML, YML, and Markdown source files require SPDX copyright headers.

Files:

  • docs/user-guide/getting-started.md
  • README.md
  • docs/index.md
  • docs/tutorials/index.md
**/*.{py,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use the repository's documented Python and Markdown style conventions and validate changes with the pinned mise formatting and checking tasks.

Files:

  • docs/user-guide/getting-started.md
  • README.md
  • docs/index.md
  • docs/tutorials/index.md
docs/**

⚙️ CodeRabbit configuration file

Review documentation as MkDocs Material content. Check Diataxis fit, accurate commands, internal links, code fences, and markdown style from STYLE_GUIDE.md.

Files:

  • docs/user-guide/getting-started.md
  • docs/index.md
  • docs/tutorials/index.md
README.md

⚙️ CodeRabbit configuration file

Treat README.md as the project overview. Check that setup, usage, and links stay consistent with CONTRIBUTING.md, Makefile, and docs/.

Files:

  • README.md
🔇 Additional comments (2)
docs/index.md (1)

20-33: LGTM!

docs/user-guide/getting-started.md (1)

29-35: LGTM!

Comment thread docs/tutorials/index.md
Comment thread README.md
zywind added 4 commits August 3, 2026 14:07
Keying the skip on "any .ipynb exists" meant a partial tutorials/ directory
left behind by an interrupted earlier run was treated as complete. Write a
.fetched marker after the staged directory is moved into place, and guard on
that instead.

Also add the continuous-billing warning to the tutorials index, which exposed
a launch badge without it, and drop a leftover decorative bold from a table
data cell.

Signed-off-by: Yunfeng Zhang <yunzhang@nvidia.com>
The index count guards against a rename slipping past the URL filter, but
equality also fails if pyproject legitimately gains an index. A floor keeps
the regression check while tolerating growth.

Signed-off-by: Yunfeng Zhang <yunzhang@nvidia.com>
The file was 43 bytes under Brev's 16 KiB limit, so any further change would
not fit. Comments were 41% of it, largely restating what script/brev/README.md
already documents at length.

Drop the section banner rules, shorten the header, and reduce each multi-line
comment to a single line pointing at the README. No code changed: the
non-comment, non-blank lines are byte-identical before and after, and both
embedded Python blocks were executed to confirm.

16341 -> 13020 bytes, leaving 3364 under the cap.

Signed-off-by: Yunfeng Zhang <yunzhang@nvidia.com>
Signed-off-by: Yunfeng Zhang <yunzhang@nvidia.com>
@zywind
zywind added this pull request to the merge queue Aug 4, 2026
Merged via the queue into main with commit 55b49d7 Aug 4, 2026
19 checks passed
@zywind
zywind deleted the zywind/376-brev-launchable branch August 4, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants