gemini-code-assist[bot] commented on PR #18854: URL: https://github.com/apache/tvm/pull/18854#issuecomment-3977382301
## Summary of Changes Hello, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the `docker/bash.sh` script to enhance its flexibility and maintainability for managing Docker development environments. The changes streamline the user experience by introducing automatic rootless Docker detection, providing a new option for specifying interactive shells, and enabling declarative bind mounts via an environment variable. It also simplifies GPU setup and improves the overall structure of the script, making it more robust and easier to understand. ### Highlights * **Auto-detect rootless Docker**: The script now automatically detects if the Docker daemon is running in rootless mode by querying `docker info`, falling back to the `DOCKER_IS_ROOTLESS` environment variable as an override for CI. * **New `--shell` option**: A new `--shell <name>` flag has been added, allowing users to specify an interactive shell (e.g., `zsh`) to use instead of `bash` when entering an auto-interactive Docker session. * **New `TVM_DEV_MOUNTS` environment variable**: A new environment variable, `TVM_DEV_MOUNTS`, is introduced for declarative mount configuration. It accepts a space-separated list of paths (e.g., `/path/to/dir` or `/src:/dst`), with source paths validated before mounting. * **Simplified GPU setup**: Legacy `nvidia-docker` detection and explicit Vulkan ICD mounting have been removed. GPU containers now consistently use the `--gpus all` flag for simplified configuration. * **Improved code organization**: The `bash.sh` script has been refactored into clearly labeled sections (Constants, Helpers, Argument Parsing, etc.) and helper functions like `detect_rootless()` and `validate_mount()` have been extracted for better readability and maintainability. 🧠**New Feature in Public Preview:** You can now enable **Memory** to help **Gemini Code Assist** learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. **Click [here](https://codeassist.google/code-review/login) to enable Memory in your admin console.** <details> <summary><b>Changelog</b></summary> * **docker/bash.sh** * Updated usage message to include `--shell` option and `TVM_DEV_MOUNTS` environment variable. * Introduced script sections for better organization (Constants, Helpers, Argument Parsing, Image Resolution, Mount Construction, Environment Construction, GPU/Device Setup, Entry Command, Final Docker Run). * Moved default variable declarations and `REPO_MOUNT_POINT` logic to the 'Constants and defaults' section. * Added `detect_rootless()` helper function to auto-detect Docker rootless mode using `docker info` or `DOCKER_IS_ROOTLESS` env var. * Added `validate_mount()` helper function to check if a mount source path exists. * Implemented parsing for the new `--shell` argument. * Refined handling of `DOCKER_IS_ROOTLESS` around `dev_common.sh` sourcing to preserve user-set values. * Added logic to process `TVM_DEV_MOUNTS` environment variable for additional bind mounts, validating source paths. * Included logic to automatically mount the `.git` common directory when running from a git worktree. * Removed legacy `nvidia-docker` detection and explicit Vulkan ICD mounting. * Standardized GPU setup to use `--gpus all` for GPU/CUDA images. * Modified the entry command to use the `USER_SHELL` if provided and the default command is `bash`. * Updated the condition for using `with_the_same_user` script to `! detect_rootless` instead of checking `DOCKER_IS_ROOTLESS` directly. </details> <details> <summary><b>Activity</b></summary> * No human activity has been recorded on this pull request yet. </details> <details> <summary><b>Using Gemini Code Assist</b></summary> <br> The full guide for Gemini Code Assist can be found on our [documentation page](https://developers.google.com/gemini-code-assist/docs/review-github-code), here are some quick tips. <b>Invoking Gemini</b> You can request assistance from Gemini at any point by creating a comment using either `/gemini <command>` or `@gemini-code-assist <command>`. Below is a summary of the supported commands on the current page. Feature | Command | Description --- | --- | --- Code Review | `/gemini review` | Performs a code review for the current pull request in its current state. Pull Request Summary | `/gemini summary` | Provides a summary of the current pull request in its current state. Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. Help | `/gemini help` | Displays a list of available commands. <b>Customization</b> To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a `.gemini/` folder in the base of the repository. Detailed instructions can be found [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). <b>Limitations & Feedback</b> Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up [here](https://google.qualtrics.com/jfe/form/SV_2cyuGuTWsEw84yG). <b>You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the [Gemini Code Assist IDE Extension](https://cloud.google.com/products/gemini/code-assist).</b> </details> [^1]: Review the [Privacy Notices](https://policies.google.com/privacy), [Generative AI Prohibited Use Policy](https://policies.google.com/terms/generative-ai/use-policy), [Terms of Service](https://policies.google.com/terms), and learn how to configure Gemini Code Assist in GitHub [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). Gemini can make mistakes, so double check it and [use code with caution](https://support.google.com/legal/answer/13505487). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
