cp: [benchmarking] Adds --use-host-curator-benchmarking and --skip-curator-image-build* options (1910) into r1.2.0#1925
Conversation
…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>
|
/ok to test fee405b |
Greptile SummaryThis cherry-pick from #1910 adds two new options to the benchmarking tooling:
Confidence Score: 4/5The 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
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
Reviews (1): Last reviewed commit: "[benchmarking] Adds `--use-host-curator-..." | Re-trigger Greptile |
| # 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 |
There was a problem hiding this comment.
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.
| # 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 |
beep boop [🤖]: Hi @rlratzel 👋,