nemo_gym.cli.setup_command
nemo_gym.cli.setup_command
Module Contents
Functions
API
Build uv pip install flags for nemo-gym in sub-venvs.
Supports:
- Pre-release versions via NEMO_GYM_ALLOW_PRERELEASE=true
- Custom PyPI indexes via UV_INDEX_URL, UV_EXTRA_INDEX_URL, UV_INDEX_STRATEGY
- Auto-detection of parent venv version for consistency
Returns: str
String of flags to add to ‘uv pip install nemo-gym’
Detect nemo-gym version from parent venv and return version specifier.
Parameters:
Whether nemo-gym is installed in editable mode in parent venv
Returns: str
Version specifier string (e.g., “==0.2.1rc0”) or empty string
Resolve the venv a server runs from: uv_venv_dir/<type>/<name>/.venv, else <server dir>/.venv.
Callers need this to launch a server with the venv’s own interpreter rather than trusting whatever
bin/activate puts on PATH. A venv copied or moved after creation keeps the original prefix
hard-coded in bin/activate, so sourcing it silently hands the server a different interpreter than
the one uv_venv_dir asked for.