Skip to content

build: add pynvml to requirements.txt #1480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

hhzhang16
Copy link
Contributor

@hhzhang16 hhzhang16 commented Jun 11, 2025

Overview:

pynvml was added to dynamo deploy 2 months ago and is required for GPU use and discovery for dynamo deploy as well as SLA profiling. If not included, GPU functionality within the devcontainer is limited.

Details:

Places pynvml is referenced in the code:

Where should the reviewer start?

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

Summary by CodeRabbit

  • Chores
    • Updated dependencies to include the nvidia-ml-py package.

Copy link
Contributor

coderabbitai bot commented Jun 11, 2025

Walkthrough

The dependency file was updated to include the nvidia-ml-py package pinned to version 12.575.51. No other modifications or version changes were made to the list of dependencies.

Changes

File(s) Change Summary
container/deps/requirements.txt Added nvidia-ml-py==12.575.51 to dependencies

Poem

A nibble of code, a package anew,
nvidia-ml-py joins the crew!
Dependencies grow, the list hops along,
With every small change, the project stays strong.
🐇✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f18248 and d606bd3.

📒 Files selected for processing (1)
  • container/deps/requirements.txt (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • container/deps/requirements.txt
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Mirror Repository to GitLab
  • GitHub Check: Build and Test - vllm

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
container/deps/requirements.txt (1)

33-33: Ensure compatibility by pinning pynvml to a known version

Currently pynvml is added without a version specifier, which can lead to unpredictable installs and GPU driver mismatches. Pin it to the version verified in your development container, for example:

-pynvml
+pynvml==11.7.0
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c43ebd2 and 6f18248.

📒 Files selected for processing (1)
  • container/deps/requirements.txt (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Mirror Repository to GitLab
  • GitHub Check: copyright-checks
  • GitHub Check: Build and Test - vllm
  • GitHub Check: pre-commit
🔇 Additional comments (1)
container/deps/requirements.txt (1)

1-43: Verify that CI and dev container use this requirements file

Confirm that your Dockerfile, CI pipelines, or any bootstrap scripts are updated to install dependencies from container/deps/requirements.txt. Without referencing this file, pynvml won’t be installed and GPU discovery/SLA profiling will continue to fail.

Copy link
Collaborator

@whoisj whoisj left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me, but I'm not a CODEOWNER for containers.

@rmccorm4 rmccorm4 changed the title feat: add pynvml to requirements.txt build: add pynvml to requirements.txt Jun 11, 2025
@github-actions github-actions bot added build and removed feat labels Jun 11, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

pynvml was added to dynamo deploy 2 months ago and is required for GPU use and discovery for dynamo deploy as well as SLA profiling. If not included, GPU functionality within the devcontainer is limited.

Where was it installed previously for the past 2 months of dev/testing this feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@biswapanda @tedzhouhk I think you two were responsible for some of the Pynvml-related code contributions!

Copy link
Contributor

Choose a reason for hiding this comment

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

@nvda-mesharma @saturley-hall @nv-anants can you help to define some guidelines on when things should be installed in container-only (ex: container/deps/requirements.txt) vs. installed in pyproject.toml?

I think we should avoid diverging core dynamo feature support from pip install ai-dynamo and docker run ... <dynamo_image> paths as much as possible.

@hhzhang16 hhzhang16 self-assigned this Jun 13, 2025
@@ -30,6 +30,7 @@ pip==25.0.1
pre-commit
protobuf==5.27.3
pydantic==2.7.1
pynvml
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@biswapanda what version do you want to freeze it at?

@@ -30,6 +30,7 @@ pip==25.0.1
pre-commit
protobuf==5.27.3
pydantic==2.7.1
pynvml
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. in general, we'd freeze version to avoid backward incompatibility / version drift

  2. we don't need pynvml to use pynvml module, it sounds confusing -
    nvidia-ml-py package installs pynvml module
    pynvml package installs pynvml_utils (we dont use this)

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.

5 participants