Repository navigation
Improves uv environment support in isaaclab.sh - #4269
Conversation
Greptile OverviewGreptile SummaryThis PR enhances the Key Changes
Issues Found
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant isaaclab.sh
participant uv/conda
participant Python
participant IsaacSim
alt Creating new uv environment
User->>isaaclab.sh: ./isaaclab.sh -u my_env
isaaclab.sh->>isaaclab.sh: Check if VIRTUAL_ENV is set
alt Already in uv environment
isaaclab.sh->>User: [INFO] Detected active uv environment
isaaclab.sh->>User: Use ./isaaclab.sh -i instead
else No active environment
isaaclab.sh->>IsaacSim: is_isaacsim_version_4_5()
alt Isaac Sim 4.5 detected
IsaacSim-->>isaaclab.sh: version = 4.5.x
isaaclab.sh->>isaaclab.sh: python_version = "3.10"
else Isaac Sim 5.0+ or not detected
isaaclab.sh->>Python: python -c "import isaacsim"
alt isaacsim importable
Python-->>isaaclab.sh: Success
isaaclab.sh->>isaaclab.sh: python_version = "3.11"
else isaacsim not found
Python-->>isaaclab.sh: Error
isaaclab.sh->>isaaclab.sh: python_version = "3.11" (default)
end
end
isaaclab.sh->>uv/conda: uv venv --python ${python_version} ${env_name}
uv/conda-->>isaaclab.sh: Environment created
isaaclab.sh->>User: [INFO] Created uv environment
end
end
alt Installing in existing environment
User->>uv/conda: source my_env/bin/activate
uv/conda-->>User: Environment activated (VIRTUAL_ENV set)
User->>isaaclab.sh: ./isaaclab.sh -i
isaaclab.sh->>isaaclab.sh: extract_python_exe()
isaaclab.sh->>isaaclab.sh: extract_pip_command()
alt VIRTUAL_ENV set and pyvenv.cfg has uv
isaaclab.sh->>isaaclab.sh: pip_command = "uv pip install"
else CONDA_PREFIX set
isaaclab.sh->>isaaclab.sh: pip_command = "${python_exe} -m pip install"
end
isaaclab.sh->>User: [INFO] Using environment: ${VIRTUAL_ENV}
isaaclab.sh->>User: [INFO] Python executable: ${python_exe}
isaaclab.sh->>Python: Install Isaac Lab extensions
Python-->>isaaclab.sh: Installation complete
end
|
There was a problem hiding this comment.
Additional Comments (4)
-
isaaclab.sh, line 679-685 (link)logic: calling
is_isaacsim_version_4_5requires a working Python executable fromextract_python_exe(). If no environment is active AND_isaac_sim/python.shdoesn't exist AND system python lacksisaacsim-rl, the script will exit with an error before creating the environment. This breaks the workflow for users who want to create a uv environment before installing Isaac Sim.fallback to a default version (3.11) if version detection fails:
-
isaaclab.sh, line 236-237 (link)logic:
grep -q "uv"uses substring matching, which could cause false positives if "uv" appears anywhere inpyvenv.cfg(e.g., in a path like/home/uv_user/or version strings). Use a more specific pattern: -
isaaclab.sh, line 249-250 (link)logic: same substring matching issue as in
extract_pip_command. Use a more specific pattern to avoid false positives: -
isaaclab.sh, line 457-458 (link)logic: same substring matching issue. Use a more specific pattern:
1 file reviewed, 4 comments
- Allow installation into existing uv/venv environments - Auto-detect Isaac Sim version for Python version selection - Display active environment information during installation - Fix tabs command compatibility for non-interactive terminals This change enables more flexible workflow patterns by detecting and using active virtual environments instead of forcing creation of new environments in the IsaacLab directory."
|
I have fixed the bugs that greptile has mentioned. |
2ef7fc8 to
f3061a4
Compare
|
Hi maintainers, the PR has been approved and is now waiting for workflow approval. |
|
@greptile-apps can we push forward now? |
|
Based on the PR status, I can see that:
Here's the current situation: ✅ Positives:
❌ Blocking factors:
Recommendation: Not quite ready to push forward yet. You should:
The PR is close but needs these technical issues resolved before it's safe to merge. The feedback about grep patterns is particularly important as it could cause false environment detection. |
|
@greptile-apps What should we do next? |
|
Based on the current status of your PR, here's what you should do next: ✅ Good News - Major Progress Made:
🚧 Outstanding Items to Address:1. Grep Pattern Issues (High Priority)There are still 4 unresolved comments about substring matching in grep patterns that could cause false positives: Lines to fix:
The Issue: 2. Potential Logic IssueLine 679-685: The current logic could break for new users who want to create a uv environment before installing Isaac Sim, because 🎯 Immediate Action Items:
📋 Next Steps:
The core functionality looks solid - you just need to make these grep patterns more robust to avoid potential false positives in production use. |
|
Thanks for the updates! will point this to our new development branch |
Description
This PR enhances the
isaaclab.shinstallation script to support flexible virtual environment workflows by allowing installation into existing uv/venv environments.Changes
-uwith an active environmentMotivation
Previously, users had to create a new environment in the IsaacLab directory. This PR enables modern Python workflows where users can:
uvproject-based workflowsThe issue is mentioned in [Bug Report] isaaclab.sh does not properly configure python version in install #3783 and Adds optional --python arg when --uv is used to create venv #3560
Type of change
Testing
Tested scenarios:
-uflag./isaaclab.sh -h)Checklist
pre-commitchecks with./isaaclab.sh --format