Skip to content

Conversation

@ananthsub
Copy link
Contributor

fixes #659

@copy-pr-bot
Copy link

copy-pr-bot bot commented Feb 9, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ananthsub ananthsub changed the title Add uv cache to optimize for venv creation Add uv cache & prefetch to optimize for venv creation Feb 9, 2026
@ananthsub ananthsub changed the title Add uv cache & prefetch to optimize for venv creation Add uv cache and prefetch to optimize for venv creation Feb 9, 2026
# UV caching directory overrides to local folders.
environ["UV_CACHE_DIR"] = str(CACHE_DIR / "uv")
# Use setdefault so a pre-warmed cache (e.g., in a container) is not overridden.
environ.setdefault("UV_CACHE_DIR", str(CACHE_DIR / "uv"))
Copy link
Contributor

Choose a reason for hiding this comment

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

can we move this environ resolution to somewhere like here?

use_absolute_ip = global_config_dict.get(USE_ABSOLUTE_IP, False)

want to centralize all parameterized pieces through the global config rather than through environment variables.

Copy link
Contributor

Choose a reason for hiding this comment

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

can we migrate this into cli.py, perhaps using the RunHelper as an inspiration? https://github.com/ananthsub/Gym/blob/b8a659be067692e7678a7ce791d3fde5fb03c380/nemo_gym/cli.py#L227

Specifically, we want to remove all environment variables and reuse the existing helper functions such as https://github.com/ananthsub/Gym/blob/b8a659be067692e7678a7ce791d3fde5fb03c380/nemo_gym/cli.py#L65

Copy link
Contributor

@bxyu-nvidia bxyu-nvidia left a comment

Choose a reason for hiding this comment

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

What is the expected user experience? can you add some guidance on when this should be used and with what recommended arguments? and also some details about how to use this with NeMo RL?

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.

Support caching for uv env creation

2 participants