Skip to content

cp: [benchmarking] Adds --use-host-curator-benchmarking and --skip-curator-image-build* options (1910) into r1.2.0#1925

Open
svcnvidia-nemo-ci wants to merge 1 commit intor1.2.0from
cherry-pick-1910-r1.2.0
Open

cp: [benchmarking] Adds --use-host-curator-benchmarking and --skip-curator-image-build* options (1910) into r1.2.0#1925
svcnvidia-nemo-ci wants to merge 1 commit intor1.2.0from
cherry-pick-1910-r1.2.0

Conversation

@svcnvidia-nemo-ci
Copy link
Copy Markdown
Contributor

beep boop [🤖]: Hi @rlratzel 👋,

we've cherry picked #1910 into  for you! 🚀

Please review and approve this cherry pick by your convenience!

…ator-image-build*` options (#1910)

* benchmarking: add --use-host-curator-benchmarking and --skip-curator-image-build* options

- gen_runscript_vars.py: add --use-host-curator-benchmarking option that
  mounts only the benchmarking/ directory into the container (vs. the full
  curator repo with --use-host-curator); add mutual exclusion check between
  the two flags
- build_docker.sh: replace simple --tag-as-latest string check with a proper
  argument parser loop; add --skip-curator-image-build (pull instead of build)
  and --skip-curator-image-build-and-pull (use existing local image) options

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: rlratzel <rratzel@nvidia.com>

* Adds NVIDIA_DRIVER_CAPABILITIES

Signed-off-by: rlratzel <rratzel@nvidia.com>

* Adds check for passing both skip args.

Signed-off-by: rlratzel <rratzel@nvidia.com>

---------

Signed-off-by: rlratzel <rratzel@nvidia.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: NeMo Bot <nemo-bot@nvidia.com>
@svcnvidia-nemo-ci
Copy link
Copy Markdown
Contributor Author

/ok to test fee405b

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 5, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 5, 2026

Greptile Summary

This cherry-pick from #1910 adds two new options to the benchmarking tooling: --skip-curator-image-build / --skip-curator-image-build-and-pull for build_docker.sh (enabling CI workflows where the curator image is already available), and --use-host-curator-benchmarking for run.sh (mounting only the host's benchmarking/ directory rather than the full repo). It also enables GPU video-codec capabilities inside the benchmarking container.

  • build_docker.sh: Replaces the original glob-based flag detection with a proper case loop; adds two mutually exclusive skip flags that allow pulling or reusing an existing curator image instead of rebuilding it.
  • gen_runscript_vars.py: Adds --use-host-curator-benchmarking, which mounts only $HOST_CURATOR_DIR/benchmarking into the container, useful for iterating on benchmarking scripts against an already-installed Curator package.
  • run.sh: Adds NVIDIA_DRIVER_CAPABILITIES=compute,utility,video so NVENC/NVDEC video codec paths are available to benchmarks that need them.

Confidence Score: 4/5

The changes are self-contained to benchmarking tooling and carry no risk to the core Curator library or production data paths.

All three files are benchmarking-only scripts. The new skip flags in build_docker.sh include a proper mutual-exclusion guard, the new --use-host-curator-benchmarking path construction mirrors the existing pattern, and the NVIDIA_DRIVER_CAPABILITIES addition is a straightforward env-var extension. The only finding is a duplicated comment that misleadingly labels the validation block — a cosmetic issue with no runtime impact.

No files require special attention; all changes are isolated to the benchmarking tooling directory.

Important Files Changed

Filename Overview
benchmarking/tools/build_docker.sh Refactors argument parsing to a proper case loop and adds --skip-curator-image-build / --skip-curator-image-build-and-pull flags with mutual-exclusion guard; minor duplicate comment on the validation block.
benchmarking/tools/gen_runscript_vars.py Adds --use-host-curator-benchmarking flag with mutual-exclusion check against --use-host-curator; correctly constructs the benchmarking-only volume mount using the same .absolute() pattern as the existing flag.
benchmarking/tools/run.sh Adds --env=NVIDIA_DRIVER_CAPABILITIES=compute,utility,video to expose GPU video-codec capabilities (NVENC/NVDEC) inside the benchmarking container.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([build_docker.sh invoked]) --> B{Parse CLI flags}
    B --> C{Both skip flags set?}
    C -- Yes --> D[Error & exit 1]
    C -- No --> E{--skip-curator-image-build-and-pull?}
    E -- Yes --> F[Use existing local CURATOR_IMAGE]
    E -- No --> G{--skip-curator-image-build?}
    G -- Yes --> H[docker pull CURATOR_IMAGE]
    G -- No --> I[docker build CURATOR_IMAGE]
    I --> J{--tag-as-latest?}
    J -- Yes --> K[docker tag curator :latest]
    J -- No --> L
    K --> L[docker build CURATOR_BENCHMARKING_IMAGE]
    F --> L
    H --> L
    L --> M{--tag-as-latest?}
    M -- Yes --> N[docker tag benchmarking :latest]
    M -- No --> O([Done])
    N --> O

    subgraph run.sh
        P([run.sh invoked]) --> Q[gen_runscript_vars.py]
        Q --> R{--use-host-curator?}
        R -- Yes --> S[Mount full HOST_CURATOR_DIR]
        R -- No --> T{--use-host-curator-benchmarking?}
        T -- Yes --> U[Mount HOST_CURATOR_DIR/benchmarking only]
        T -- No --> V[No curator mount]
        S --> W[docker run with NVIDIA_DRIVER_CAPABILITIES=compute,utility,video]
        U --> W
        V --> W
    end
Loading

Reviews (1): Last reviewed commit: "[benchmarking] Adds `--use-host-curator-..." | Re-trigger Greptile

Comment on lines +55 to +61
# Either pull, build, or skip the standard NeMo Curator image
if ${SKIP_CURATOR_BUILD} && ${SKIP_CURATOR_BUILD_AND_PULL}; then
echo "Error: --skip-curator-image-build and --skip-curator-image-build-and-pull cannot be combined."
exit 1
fi

if ${TAG_AS_LATEST}; then
# Tag image as <name>:latest, where <name> is the part of CURATOR_IMAGE before the colon
docker tag "${CURATOR_IMAGE}" "${CURATOR_IMAGE%%:*}:latest"
# Either pull, build, or skip the standard NeMo Curator image
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.

P2 The comment on line 55 is a copy-paste duplicate of the comment on line 61. The first block's comment should describe its actual purpose — validating that the two skip flags aren't combined — rather than describing the action that follows later.

Suggested change
# Either pull, build, or skip the standard NeMo Curator image
if ${SKIP_CURATOR_BUILD} && ${SKIP_CURATOR_BUILD_AND_PULL}; then
echo "Error: --skip-curator-image-build and --skip-curator-image-build-and-pull cannot be combined."
exit 1
fi
if ${TAG_AS_LATEST}; then
# Tag image as <name>:latest, where <name> is the part of CURATOR_IMAGE before the colon
docker tag "${CURATOR_IMAGE}" "${CURATOR_IMAGE%%:*}:latest"
# Either pull, build, or skip the standard NeMo Curator image
# Validate that conflicting skip flags are not combined
if ${SKIP_CURATOR_BUILD} && ${SKIP_CURATOR_BUILD_AND_PULL}; then
echo "Error: --skip-curator-image-build and --skip-curator-image-build-and-pull cannot be combined."
exit 1
fi
# Either pull, build, or skip the standard NeMo Curator image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants