Skip to content

fix(models): fix default model_puller image for NIMCache#804

Closed
anubhutivyas wants to merge 2 commits into
mainfrom
anubhutiv/fix-6480466
Closed

fix(models): fix default model_puller image for NIMCache#804
anubhutivyas wants to merge 2 commits into
mainfrom
anubhutiv/fix-6480466

Conversation

@anubhutivyas

@anubhutivyas anubhutivyas commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Issue:

  • Creating a deployment on k8s backend fails during NIMCache init with below error because the NIMCache pod runs the platform nmp-api image, which does not contain download-to-cache.
Error: failed to start container "nim-cache-ctr": OCI runtime create failed:
exec: "download-to-cache": executable file not found in $PATH
  • compile_nimcache builds a NIMCache CR where the HF source modelPuller is set from the models service's huggingface_model_puller whose value is set to nmp-api image by default

Change:
Following how we have a separate field in DockerBackendConfig for docker backend, create a new field huggingface_model_puller in K8sNimOperatorConfig and set the default as nds-v2-huggingface-cli:25.10, which ships download-to-cache.

Summary by CodeRabbit

  • New Features
    • Added a new configuration option for the Hugging Face model-puller image used by NIMCache, with a pinned default image.
  • Documentation
    • Updated the configuration reference to reflect the new default and clarify the cache-population entrypoint behavior.
  • Bug Fixes
    • Ensured NIMCache downloads for Files-service–backed deployments consistently use the configured puller image.
  • Tests
    • Updated and added unit tests to validate the default puller image behavior and related NIMCache generation.

@github-actions github-actions Bot added the fix label Jul 20, 2026
Signed-off-by: anubhutiv <anubhutiv@nvidia.com>
@anubhutivyas
anubhutivyas force-pushed the anubhutiv/fix-6480466 branch from fa7db5c to 6421ccc Compare July 20, 2026 23:10
@github-actions

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 26387/34035 77.5% 61.8%
Integration Tests 15176/32660 46.5% 18.7%

@anubhutivyas
anubhutivyas marked this pull request as ready for review July 21, 2026 00:07
@anubhutivyas
anubhutivyas requested review from a team as code owners July 21, 2026 00:07
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 839e34f6-8ee1-43c6-bbc4-e7ab55a4a972

📥 Commits

Reviewing files that changed from the base of the PR and between 6421ccc and 6e5d51b.

📒 Files selected for processing (2)
  • services/core/models/src/nmp/core/models/controllers/backends/k8s_nim_operator/backend.py
  • services/core/models/src/nmp/core/models/controllers/backends/k8s_nim_operator/reconcilers/nim_operator.py
💤 Files with no reviewable changes (1)
  • services/core/models/src/nmp/core/models/controllers/backends/k8s_nim_operator/backend.py

📝 Walkthrough

Walkthrough

The NIM operator now configures its Hugging Face model puller through K8sNimOperatorConfig, using a pinned CLI image by default. NIMCache compilation and reconciliation consume this setting, with tests covering custom and default puller behavior.

Changes

NIM operator model puller

Layer / File(s) Summary
Puller configuration contract
services/core/models/.../k8s_nim_operator/config.py, docs/set-up/config-reference.mdx
Adds the huggingface_model_puller setting with the nds-v2-huggingface-cli:25.10 default and documents its download-to-cache entrypoint.
NIMCache compilation and reconciliation
services/core/models/.../k8s_nim_operator/nimservice_compiler.py, services/core/models/.../k8s_nim_operator/reconcilers/nim_operator.py, services/core/models/.../k8s_nim_operator/backend.py
Removes the compiler and reconciler puller arguments, reads the image from backend configuration, and updates reconciliation wiring.
Puller behavior tests
services/core/models/tests/unit/controllers/test_nimservice_compiler.py, services/core/models/tests/unit/controllers/test_k8s_nim_operator_backend.py
Updates test setup for the configuration-based image and verifies the pinned default excludes nmp-api.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: fixing the default model puller image for NIMCache.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch anubhutiv/fix-6480466
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch anubhutiv/fix-6480466

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

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.

Since you added the model puller to the K8sNimOperatorConfig, this is redundant information. We should just rely on the backend_config.huggingface_model_puller.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was actually left as is intentionally because I didn't want to touch the tool-call-plugin's container image, but thinking through this I feel it won't break anything as we were using the nds image earlier too. Removed _huggingface_model_puller from contructor and now using backend_config.huggingface_model_puller everywhere.

Signed-off-by: anubhutiv <anubhutiv@nvidia.com>
@anubhutivyas

Copy link
Copy Markdown
Contributor Author

Closing it because we have removed the k8s-nim-operator in this PR - #705

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants