Skip to content

Conversation

@Mayankm96
Copy link
Contributor

@Mayankm96 Mayankm96 commented Dec 29, 2025

Description

This MR adds devcontainer integration for Isaac Lab.

I am facing some issues triggering a build form inside the container but I can safely build one on the terminal and attach the IDe to it. Looking for suggestions from the community!

Fixes # (issue)

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 29, 2025
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 29, 2025

Greptile Summary

This PR adds VS Code Dev Container support to Isaac Lab, enabling developers to work in a containerized environment with all dependencies pre-configured.

Key Changes:

  • Added .devcontainer/devcontainer.json configuration that integrates with the existing docker-compose.yaml
  • Created comprehensive documentation (devcontainer.rst) covering setup, usage, customization, and troubleshooting
  • Updated developer guide index to include the new devcontainer documentation

Implementation Details:

  • Uses the existing isaac-lab-base service from Docker Compose
  • Configures Python interpreter to use Isaac Sim's Python at /isaac-sim/python.sh
  • Includes VS Code settings for Black formatting (120 char line length), isort, and Pylance
  • Forwards ports 8888 (Jupyter) and 6006 (TensorBoard)
  • Runs as root user (Isaac Sim requirement) with clear documentation about file ownership implications

Issues Found:

  • The devcontainer configuration references formatters (ms-python.black-formatter, isort) in settings but doesn't include them in the extensions array, which will cause the formatting features to not work until users manually install these extensions

Confidence Score: 4/5

  • Safe to merge with one extension configuration fix needed
  • The implementation is well-documented and integrates cleanly with existing Docker infrastructure. However, the missing formatter extensions in the extensions array will cause formatting features to not work out-of-the-box, requiring users to manually install them. The documentation is thorough and accurately describes the setup. Once the extension list is corrected, this will be a valuable addition to the developer tooling.
  • .devcontainer/devcontainer.json needs the formatter extensions added to the extensions array to match the configured settings

Important Files Changed

Filename Overview
.devcontainer/devcontainer.json New devcontainer configuration that integrates with docker-compose, includes VS Code Python settings and extension recommendations; references deprecated Black formatter settings
docs/source/overview/developer-guide/devcontainer.rst Comprehensive documentation for devcontainer setup with prerequisites, usage instructions, troubleshooting, and warnings about root user
docs/source/overview/developer-guide/index.rst Simple documentation index update to include devcontainer documentation link

Sequence Diagram

sequenceDiagram
    participant User
    participant VSCode as VS Code
    participant DevContainer as Dev Container Extension
    participant Docker as Docker Engine
    participant Compose as Docker Compose
    participant Container as Isaac Lab Container
    
    User->>VSCode: Open Isaac Lab folder
    User->>VSCode: Command: "Reopen in Container"
    VSCode->>DevContainer: Read .devcontainer/devcontainer.json
    DevContainer->>Docker: Check if image exists
    
    alt Image doesn't exist
        DevContainer->>Compose: docker-compose -f docker/docker-compose.yaml build isaac-lab-base
        Compose->>Docker: Build Isaac Lab base image
        Docker-->>Compose: Build complete
    end
    
    DevContainer->>Compose: docker-compose up isaac-lab-base
    Compose->>Docker: Start container with GPU, network=host
    Docker->>Container: Mount workspace at /workspace/isaaclab
    Docker->>Container: Set environment variables (DISPLAY, ISAACLAB_PATH, etc.)
    Docker->>Container: Mount .Xauthority for X11
    Container-->>Docker: Container running
    
    DevContainer->>Container: Connect VS Code Server
    DevContainer->>Container: Install extensions (ms-python.python)
    Container->>Container: Run postCreateCommand
    Container-->>DevContainer: Extensions installed
    
    DevContainer-->>VSCode: Container ready
    VSCode-->>User: Workspace opened in container
    
    User->>Container: Run commands via VS Code terminal
    Container-->>User: Execute with Isaac Sim Python interpreter
    
    User->>VSCode: Close/Exit
    VSCode->>DevContainer: Shutdown
    DevContainer->>Compose: docker-compose stop (shutdownAction: stopCompose)
    Compose->>Container: Stop container
    Container-->>Compose: Stopped
    Compose-->>DevContainer: Container stopped
    DevContainer-->>VSCode: Cleanup complete
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Additional Comments (1)

  1. .devcontainer/devcontainer.json, line 67 (link)

    logic: references ms-python.black-formatter extension, but it's not listed in the extensions array on line 49. Add it to ensure the formatter is available.

    And update the extensions array:

    "extensions": [
      "ms-python.python",
      "ms-python.black-formatter",
      "ms-python.isort"
    ]

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant