perf(docker): hardlink worker venvs into layers - #3947
Closed
tdene wants to merge 3 commits into
Closed
Conversation
Replaces the symlink scheme with hardlinks. Increased size of image by ~3%. Reduces number of symlinks from ~1.5M to ~3k. Improves SQSH conversion time from ~3 hours to ~25 minutes. Signed-off-by: Teodor-Dumitru Ene <teodord.ene@gmail.com>
|
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Signed-off-by: Teodor-Dumitru Ene <teodord.ene@gmail.com>
Contributor
Author
|
@terrykong I made a new commit 630d380 that moves the manifest's data from a separate file into If you'd like, take a look at the before-and-after of 630d380 Personally I prefer the before state, with a separate manifest file. |
Contributor
Author
|
/ok to test 630d380 |
Signed-off-by: Teodor-Dumitru Ene <teodord.ene@gmail.com>
tdene
force-pushed
the
tde/hardlink_venv_prefetch
branch
from
September 2, 2026 07:48
630d380 to
a6e758f
Compare
Contributor
Author
|
/ok to test a6e758f |
terrykong
added a commit
that referenced
this pull request
Sep 4, 2026
Venvs under NEMO_RL_VENV_DIR are reused rather than rebuilt, and after #3947 nothing prunes them -- the base sync passes --inexact and 'uv run' is inexact by default. So changing an actor's extras leaves the old extra's packages installed in a venv that is silently reused. _check_container_fingerprint() is what catches that and points the user at NRL_FORCE_REBUILD_VENVS=true, but generate_fingerprint.py hashes only pyproject.toml, uv.lock and the submodule SHAs. While the table lived in pyproject.toml that was covered by accident; moving it to a .py file dropped the coverage. Hash the table explicitly so the check still fires. Verified: swapping MegatronValueWorker from ['mcore'] to ['automodel'] changes the fingerprint hash. Adds a test so the coupling cannot break silently. Signed-off-by: Terry Kong <terryk@nvidia.com>
terrykong
added a commit
that referenced
this pull request
Sep 5, 2026
Venvs under NEMO_RL_VENV_DIR are reused rather than rebuilt, and after #3947 nothing prunes them -- the base sync passes --inexact and 'uv run' is inexact by default. So changing an actor's extras leaves the old extra's packages installed in a venv that is silently reused. _check_container_fingerprint() is what catches that and points the user at NRL_FORCE_REBUILD_VENVS=true, but generate_fingerprint.py hashes only pyproject.toml, uv.lock and the submodule SHAs. While the table lived in pyproject.toml that was covered by accident; moving it to a .py file dropped the coverage. Hash the table explicitly so the check still fires. Verified: swapping MegatronValueWorker from ['mcore'] to ['automodel'] changes the fingerprint hash. Adds a test so the coupling cannot break silently. Signed-off-by: Terry Kong <terryk@nvidia.com>
4 tasks
terrykong
added a commit
that referenced
this pull request
Sep 7, 2026
Venvs under NEMO_RL_VENV_DIR are reused rather than rebuilt, and after #3947 nothing prunes them -- the base sync passes --inexact and 'uv run' is inexact by default. So changing an actor's extras leaves the old extra's packages installed in a venv that is silently reused. _check_container_fingerprint() is what catches that and points the user at NRL_FORCE_REBUILD_VENVS=true, but generate_fingerprint.py hashes only pyproject.toml, uv.lock and the submodule SHAs. While the table lived in pyproject.toml that was covered by accident; moving it to a .py file dropped the coverage. Hash the table explicitly so the check still fires. Verified: swapping MegatronValueWorker from ['mcore'] to ['automodel'] changes the fingerprint hash. Adds a test so the coupling cannot break silently. Signed-off-by: Terry Kong <terryk@nvidia.com>
terrykong
added a commit
that referenced
this pull request
Sep 7, 2026
Venvs under NEMO_RL_VENV_DIR are reused rather than rebuilt, and after #3947 nothing prunes them -- the base sync passes --inexact and 'uv run' is inexact by default. So changing an actor's extras leaves the old extra's packages installed in a venv that is silently reused. _check_container_fingerprint() is what catches that and points the user at NRL_FORCE_REBUILD_VENVS=true, but generate_fingerprint.py hashes only pyproject.toml, uv.lock and the submodule SHAs. While the table lived in pyproject.toml that was covered by accident; moving it to a .py file dropped the coverage. Hash the table explicitly so the check still fires. Verified: swapping MegatronValueWorker from ['mcore'] to ['automodel'] changes the fingerprint hash. Adds a test so the coupling cannot break silently. Signed-off-by: Terry Kong <terryk@nvidia.com>
terrykong
added a commit
that referenced
this pull request
Sep 8, 2026
Venvs under NEMO_RL_VENV_DIR are reused rather than rebuilt, and after #3947 nothing prunes them -- the base sync passes --inexact and 'uv run' is inexact by default. So changing an actor's extras leaves the old extra's packages installed in a venv that is silently reused. _check_container_fingerprint() is what catches that and points the user at NRL_FORCE_REBUILD_VENVS=true, but generate_fingerprint.py hashes only pyproject.toml, uv.lock and the submodule SHAs. While the table lived in pyproject.toml that was covered by accident; moving it to a .py file dropped the coverage. Hash the table explicitly so the check still fires. Verified: swapping MegatronValueWorker from ['mcore'] to ['automodel'] changes the fingerprint hash. Adds a test so the coupling cannot break silently. Signed-off-by: Terry Kong <terryk@nvidia.com>
terrykong
added a commit
that referenced
this pull request
Sep 8, 2026
Venvs under NEMO_RL_VENV_DIR are reused rather than rebuilt, and after #3947 nothing prunes them -- the base sync passes --inexact and 'uv run' is inexact by default. So changing an actor's extras leaves the old extra's packages installed in a venv that is silently reused. _check_container_fingerprint() is what catches that and points the user at NRL_FORCE_REBUILD_VENVS=true, but generate_fingerprint.py hashes only pyproject.toml, uv.lock and the submodule SHAs. While the table lived in pyproject.toml that was covered by accident; moving it to a .py file dropped the coverage. Hash the table explicitly so the check still fires. Verified: swapping MegatronValueWorker from ['mcore'] to ['automodel'] changes the fingerprint hash. Adds a test so the coupling cannot break silently. Signed-off-by: Terry Kong <terryk@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the symlink scheme with hardlinks.
Increased size of image by ~3%.
Reduces number of symlinks from ~1.5M to ~3k.
Improves SQSH conversion time from ~3 hours to ~25 minutes.
See internal pipeline at 65564509.
What does this PR do ?
Add a one line overview of what this PR aims to accomplish.
Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information