Skip to content

[None][doc] Note runtime-dependency requirement for the kimi_k3 Slurm container image - #17456

Open
brnguyen2 wants to merge 1 commit into
NVIDIA:mainfrom
brnguyen2:k3/readme-container-prereqs
Open

[None][doc] Note runtime-dependency requirement for the kimi_k3 Slurm container image#17456
brnguyen2 wants to merge 1 commit into
NVIDIA:mainfrom
brnguyen2:k3/readme-container-prereqs

Conversation

@brnguyen2

@brnguyen2 brnguyen2 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Dev Engineer Review

  • Updated examples/kimi_k3/README.md to clarify container and environment requirements.
  • Documented the PYTHONPATH="$REPO" requirement for Slurm script execution.
  • No code, configuration, API, or test-list changes.
  • Documentation changes are consistent with the described runtime behavior.

QA Engineer Review

No test changes.

Description

The examples/kimi_k3 prerequisites are performed inside a TensorRT-LLM
container, but the Slurm launchers start a fresh container from --image
and mount only the repository and the checkpoint. Nothing dependency-shaped
carries over from the container where the prerequisites were run:

  • the repository-root .venv-3.12 created by build_wheel.py is a build
    virtual environment (Conan, pip, and their helpers; no PyTorch or
    Transformers), so it does not carry the runtime;
  • pip install --no-deps -e . deliberately installs only tensorrt_llm.

So the runtime dependencies must come from the image itself. A multi-GPU
Slurm submission using a build image failed on every rank with a bare
ModuleNotFoundError: No module named 'transformers' raised from inside
tensorrt_llm/llmapi/llm.py — nothing in the message points at the image.

This adds a short note to the Prerequisites section stating that --image
must be a release-style TensorRT-LLM container that already provides the
runtime dependencies, and explaining why. It also documents why the scripts
export PYTHONPATH="$REPO": python3 <script> puts the script's directory
on sys.path, not the repository root, so a launcher adapted without that
export fails with No module named 'tensorrt_llm' even with a correct image.

Documentation only; no code changes.

Note: PR #17455 also edits examples/kimi_k3/README.md (run/examples area).
This change is confined to Prerequisites, but a textual conflict is possible;
whichever merges second will resolve it.

Test Coverage

Documentation-only change; no tests apply.

PR Checklist

  • Please check this after reviewing the above items as appropriate for this PR.

The kimi_k3 prerequisites are performed inside a container, but the Slurm
scripts start a fresh container from --image and mount only the repository
and the checkpoint. Nothing dependency-shaped carries over: the
repository-root .venv-3.12 is the build venv created by build_wheel.py, and
the editable install is --no-deps. Passing a build/devel image therefore
fails every rank with a bare ModuleNotFoundError for a runtime dependency.

Document that --image must be a release-style TensorRT-LLM container, and
note why the scripts export PYTHONPATH for anyone adapting them.

Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
@brnguyen2
brnguyen2 requested a review from a team as a code owner August 10, 2026 01:39
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The Kimi K3 README expands Slurm prerequisites. It documents required TensorRT-LLM runtime dependencies, the build environment limitation, the related ModuleNotFoundError, container environment details, and the required repository-root PYTHONPATH.

Changes

Kimi K3 runtime setup

Layer / File(s) Summary
Slurm runtime prerequisites
examples/kimi_k3/README.md
The documentation requires a release-style runtime image, explains the missing-dependency failure, and preserves the repository-root PYTHONPATH export for tensorrt_llm imports.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: bowenfu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies a documentation change that adds the runtime-dependency requirement for the kimi_k3 Slurm container image.
Description check ✅ Passed The description includes the issue, solution, test coverage, documentation-only scope, and an appropriate checklist review statement.
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 unit tests (beta)
  • Create PR with unit tests

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

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

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 `@examples/kimi_k3/README.md`:
- Around line 38-43: Update the container-boundary description in the README to
state that packages installed into repository-mounted paths, including
`$REPO/.venv-3.12`, `$HOME`, or paths from `EXTRA_MOUNTS`, carry into the Slurm
container, while packages installed only in the preparation container’s base
environment do not. Replace the inaccurate claim that nothing installed during
build preparation carries over and preserve the surrounding explanation of the
virtual environment and editable install.
🪄 Autofix

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: db1b56e4-42dd-4fcb-a684-eee167ddef36

📥 Commits

Reviewing files that changed from the base of the PR and between d16d01f and 40d8559.

📒 Files selected for processing (1)
  • examples/kimi_k3/README.md

Comment on lines +38 to +43
scripts start a fresh container from that image and mount only the
repository and the checkpoint, so nothing installed while preparing the
build carries over: the repository-root `.venv-3.12` is the build
environment created by `build_wheel.py` (it contains Conan and pip, not
PyTorch or Transformers), and `pip install --no-deps -e .` installs
`tensorrt_llm` alone. With an image that lacks the dependencies, every rank

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Correct the container-boundary description.

The Slurm script mounts $REPO and uses $REPO/.venv-3.12/bin. Packages installed into that repository-mounted virtual environment therefore carry into the Slurm container. This includes the packages installed at Lines 51-64. The script also mounts $HOME and supports EXTRA_MOUNTS.

Replace “nothing installed while preparing the build carries over” with a distinction between packages in mounted paths and packages installed only in the preparation container’s base environment.

Suggested wording
-  image. The Slurm scripts start a fresh container from that image and mount only the
-  repository and the checkpoint, so nothing installed while preparing the build carries over:
+  image. The Slurm scripts start a fresh container from that image. They mount the
+  repository, including `.venv-3.12`, and the checkpoint, so packages installed in
+  that virtual environment are available. Packages installed only in the preparation
+  container's base environment are not:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
scripts start a fresh container from that image and mount only the
repository and the checkpoint, so nothing installed while preparing the
build carries over: the repository-root `.venv-3.12` is the build
environment created by `build_wheel.py` (it contains Conan and pip, not
PyTorch or Transformers), and `pip install --no-deps -e .` installs
`tensorrt_llm` alone. With an image that lacks the dependencies, every rank
scripts start a fresh container from that image. They mount the
repository, including `.venv-3.12`, and the checkpoint, so packages installed in
that virtual environment are available. Packages installed only in the preparation
container's base environment are not:
repository-root `.venv-3.12` is the build environment created by `build_wheel.py`
(it contains Conan and pip, not PyTorch or Transformers), and `pip install
--no-deps -e .` installs `tensorrt_llm` alone. With an image that lacks the dependencies, every rank
🤖 Prompt for 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.

In `@examples/kimi_k3/README.md` around lines 38 - 43, Update the
container-boundary description in the README to state that packages installed
into repository-mounted paths, including `$REPO/.venv-3.12`, `$HOME`, or paths
from `EXTRA_MOUNTS`, carry into the Slurm container, while packages installed
only in the preparation container’s base environment do not. Replace the
inaccurate claim that nothing installed during build preparation carries over
and preserve the surrounding explanation of the virtual environment and editable
install.

@brnguyen2

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64914 [ run ] triggered by Bot. Commit: 40d8559 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64914 [ run ] completed with state SUCCESS. Commit: 40d8559
/LLM/main/L0_MergeRequest_PR pipeline #52753 completed with status: 'SUCCESS'

CI Report

Link to invocation

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.

2 participants