Skip to content

ci: authenticate nvcr.io container pulls with NGC API key - #1559

Merged
kevalmorabia97 merged 1 commit into
mainfrom
kmorabia/ngc-container-auth
May 28, 2026
Merged

kevalmorabia97 merged 1 commit into
mainfrom
kmorabia/ngc-container-auth

Conversation

@kevalmorabia97

@kevalmorabia97 kevalmorabia97 commented May 28, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Type of change: Bug fix (CI infrastructure)

NGC now requires authenticated pulls for nvcr.io/nvidia/nemo:* (and likely other) containers after an EULA acceptance gate. Unauthenticated pulls fail with:

Error response from daemon: Head "https://nvcr.io/v2/nvidia/nemo/manifests/26.04":
denied: Please accept license on the browser to be able to download

Add a credentials: block to the container: spec in gpu_tests.yml and _example_tests_runner.yml so GitHub Actions logs in to nvcr.io with an NGC API key before pulling.

Usage

container:
  image: nvcr.io/nvidia/${{ matrix.container_image }}
  credentials:
    username: $oauthtoken
    password: ${{ secrets.NGC_API_KEY }}

Required follow-up (cannot be done in code)

  1. Add a repo secret NGC_API_KEY (Settings → Secrets and variables → Actions).
  2. An NGC org admin must log into ngc.nvidia.com once and accept the EULA on the relevant containers (NeMo, PyTorch, TensorRT-LLM). The API key alone does not bypass the EULA gate.

Testing

  • Workflow YAML validates locally (no syntax errors).
  • Full verification requires the secret to be set and the EULA accepted — will be confirmed on the next workflow run.

Before your PR is "Ready for review"

  • Is this change backward compatible?: ✅
  • If you copied code from any other sources or added a new PIP dependency, did you follow guidance in CONTRIBUTING.md: N/A
  • Did you write any new necessary tests?: N/A
  • Did you update Changelog?: N/A
  • Did you get Claude approval on this PR?: N/A

Additional Information

The lint warning Context access might be invalid: NGC_API_KEY shown in IDE will resolve once the secret is added to the repository.

Summary by CodeRabbit

  • Chores
    • Updated GitHub Actions workflows to improve container registry authentication for test infrastructure.

Review Change Stack

NGC now requires authenticated pulls for NeMo (and other) containers
after an EULA acceptance gate. Add `credentials:` to the `container:`
blocks in gpu_tests.yml and _example_tests_runner.yml so GitHub Actions
logs in to nvcr.io before pulling.

Requires repo secret NGC_API_KEY and one-time EULA acceptance on
ngc.nvidia.com by an org admin.

Signed-off-by: Keval Morabia <[email protected]>
@kevalmorabia97
kevalmorabia97 requested a review from a team as a code owner May 28, 2026 16:26
@coderabbitai

coderabbitai Bot commented May 28, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This pull request adds NGC registry authentication credentials to two GitHub Actions workflows. Container registry credentials are configured in the reusable test runner workflow and the GPU tests workflow, both using the same authentication pattern with an oauthToken username and API key secret for pulling NGC container images.

Changes

NGC Registry Authentication

Layer / File(s) Summary
NGC container registry credentials
.github/workflows/_example_tests_runner.yml, .github/workflows/gpu_tests.yml
Container credentials configuration is added to two workflows' container definitions, both specifying oauthToken username and secrets.NGC_API_KEY password for NGC image authentication.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci: authenticate nvcr.io container pulls with NGC API key' clearly and specifically describes the main change: adding NGC API key authentication to container pulls from nvcr.io in CI workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Security Anti-Patterns ✅ Passed PR modifies only workflow YAML files to add container registry credentials; no Python code changes present, so security check does not apply.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kmorabia/ngc-container-auth

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

@kevalmorabia97
kevalmorabia97 enabled auto-merge (squash) May 28, 2026 16:28

@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.

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/_example_tests_runner.yml:
- Around line 37-39: The reusable workflow `_example_tests_runner.yml` consumes
secrets NGC_API_KEY, HF_TOKEN, and CODECOV_TOKEN but does not declare them under
on.workflow_call.secrets; add an on.workflow_call.secrets section that declares
each secret (NGC_API_KEY, HF_TOKEN, CODECOV_TOKEN) so callers using `secrets:
inherit` will be validated (mark them required as appropriate) to surface
missing-secret errors.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 81875e7f-8bdf-43c1-a72c-c0da9529e846

📥 Commits

Reviewing files that changed from the base of the PR and between b49f9b9 and 1f7e84d.

📒 Files selected for processing (2)
  • .github/workflows/_example_tests_runner.yml
  • .github/workflows/gpu_tests.yml

@jenchen13 jenchen13 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.

thank you!

@codecov

codecov Bot commented May 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.97%. Comparing base (b49f9b9) to head (1f7e84d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1559      +/-   ##
==========================================
+ Coverage   69.43%   75.97%   +6.54%     
==========================================
  Files         477      477              
  Lines       51977    51977              
==========================================
+ Hits        36090    39490    +3400     
+ Misses      15887    12487    -3400     
Flag Coverage Δ
gpu 59.53% <ø> (+7.98%) ⬆️
unit 52.76% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kevalmorabia97
kevalmorabia97 disabled auto-merge May 28, 2026 17:28
@kevalmorabia97
kevalmorabia97 merged commit a5b7d3e into main May 28, 2026
40 checks passed
@kevalmorabia97
kevalmorabia97 deleted the kmorabia/ngc-container-auth branch May 28, 2026 17:28
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-05-28 17:28 UTC

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants