Skip to content

[Don't merge]avocado.utils.podman: Add VLLM container support and enhanced lifecyc…#6274

Open
abdhaleegit wants to merge 1 commit intoavocado-framework:masterfrom
abdhaleegit:podman-options
Open

[Don't merge]avocado.utils.podman: Add VLLM container support and enhanced lifecyc…#6274
abdhaleegit wants to merge 1 commit intoavocado-framework:masterfrom
abdhaleegit:podman-options

Conversation

@abdhaleegit
Copy link
Contributor

…le management

  • Add run_vllm_container() method for creating VLLM containers with AIU support

    • Device mapping for /dev/vfio
    • Volume mounting for model directories
    • Environment variables (AIU_PCIE_IDS, VLLM_SPYRE_USE_CB, optional chunk settings)
    • Privileged mode with custom memory/shm settings
    • Port mapping and VLLM-specific arguments
  • Add container lifecycle management methods:

    • list_containers(): List all or running containers
    • logs(): Get container logs with follow and tail options
    • inspect(): Get detailed container information
    • remove(): Delete containers with optional force flag
    • stats(): Monitor container resource usage
  • Enhance login() method with API key authentication support

    • Add api_key parameter for token-based authentication
    • Auto-use 'iamapikey' username for IBM Cloud registries
    • Maintain backward compatibility with username/password auth
  • Add concurrent container management methods (AsyncPodman only):

    • run_multiple_vllm_containers(): Create N containers concurrently with unique AIU IDs
    • start_multiple_containers(): Start multiple containers in parallel
    • stop_multiple_containers(): Stop multiple containers in parallel
    • remove_multiple_containers(): Remove multiple containers in parallel
    • get_multiple_container_logs(): Retrieve logs from multiple containers concurrently
  • Add pull() method for downloading container images from registries

All methods implemented in both synchronous (Podman) and asynchronous (AsyncPodman) versions. Maintains existing code structure and error handling patterns.

  • Assisted by AI tools

@mr-avocado mr-avocado bot moved this to Review Requested in Default project Feb 23, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @abdhaleegit, I'm Gemini Code Assist1! 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 expands the avocado.utils.podman module by introducing comprehensive support for managing VLLM (Very Large Language Model) containers, including specialized run configurations for AIU (AI Unit) environments. It also adds a suite of new methods for general container lifecycle management, enhances registry login capabilities with API key support, and provides asynchronous methods for concurrent operations on multiple containers.

Highlights

  • VLLM Container Support: Added a dedicated method run_vllm_container to launch VLLM containers with specific configurations for AIU devices, model mounting, environment variables, and resource limits.
  • Enhanced Container Lifecycle Management: Introduced new methods for listing, inspecting, retrieving logs, removing, and monitoring resource usage (stats) of Podman containers.
  • API Key Authentication for Registries: Updated the login method to support API key-based authentication, particularly for IBM Cloud registries, while maintaining backward compatibility.
  • Concurrent Container Operations: Implemented asynchronous methods in AsyncPodman for running multiple VLLM containers, and concurrently starting, stopping, removing, and fetching logs for multiple containers.
  • Image Pull Functionality: Added a pull method to download container images from registries.
Changelog
  • avocado/utils/podman.py
    • Imported asyncio for asynchronous operations.
    • Implemented run_vllm_container for VLLM-specific container execution.
    • Added list_containers to retrieve container information.
    • Introduced logs to fetch container logs with options for following and tailing.
    • Provided inspect for detailed container metadata.
    • Added remove for deleting containers, with a force option.
    • Modified login to include api_key parameter for authentication.
    • Included pull for downloading container images.
    • Added stats for monitoring container resource usage.
    • Implemented asynchronous counterparts for all new methods within AsyncPodman.
    • Introduced run_multiple_vllm_containers for concurrent VLLM container deployment.
    • Added start_multiple_containers, stop_multiple_containers, remove_multiple_containers, and get_multiple_container_logs for parallel management of multiple containers.
Activity
  • No activity to report for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

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.

Customization

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.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 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.

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.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces significant enhancements to the avocado.utils.podman module, adding comprehensive support for VLLM container management and expanding container lifecycle operations. This includes new methods for running VLLM containers with AIU support, listing, logging, inspecting, and removing containers, and an improved login mechanism with API key authentication. Additionally, asynchronous versions of these methods are provided, along with concurrent container management functionalities. The changes are well-structured and maintain existing error handling patterns. My review focused on correctness, efficiency, and maintainability, ensuring the new functionalities integrate seamlessly and robustly.

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 9.40171% with 212 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.16%. Comparing base (cbea52d) to head (d31c2fb).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
avocado/utils/podman.py 9.40% 212 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6274      +/-   ##
==========================================
- Coverage   73.84%   73.16%   -0.69%     
==========================================
  Files         206      206              
  Lines       22565    22799     +234     
==========================================
+ Hits        16663    16680      +17     
- Misses       5902     6119     +217     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…le management

- Add run_vllm_container() method for creating VLLM containers with AIU support
  * Device mapping for /dev/vfio
  * Volume mounting for model directories
  * Environment variables (AIU_PCIE_IDS, VLLM_SPYRE_USE_CB, optional chunk settings)
  * Privileged mode with custom memory/shm settings
  * Port mapping and VLLM-specific arguments

- Add container lifecycle management methods:
  * list_containers(): List all or running containers
  * logs(): Get container logs with follow and tail options
  * inspect(): Get detailed container information
  * remove(): Delete containers with optional force flag
  * stats(): Monitor container resource usage

- Enhance login() method with API key authentication support
  * Add api_key parameter for token-based authentication
  * Auto-use 'iamapikey' username for IBM Cloud registries
  * Maintain backward compatibility with username/password auth

- Add concurrent container management methods (AsyncPodman only):
  * run_multiple_vllm_containers(): Create N containers concurrently with unique AIU IDs
  * start_multiple_containers(): Start multiple containers in parallel
  * stop_multiple_containers(): Stop multiple containers in parallel
  * remove_multiple_containers(): Remove multiple containers in parallel
  * get_multiple_container_logs(): Retrieve logs from multiple containers concurrently

- Add pull() method for downloading container images from registries

All methods implemented in both synchronous (Podman) and asynchronous (AsyncPodman) versions.
Maintains existing code structure and error handling patterns.

- Assisted by AI tools

Signed-off-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
Copy link
Collaborator

@PraveenPenguin PraveenPenguin left a comment

Choose a reason for hiding this comment

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

LGTM

@abdhaleegit
Copy link
Contributor Author

@PraveenPenguin a little more testing is inprogress, please do not merge until my confirmation

@PraveenPenguin PraveenPenguin changed the title avocado.utils.podman: Add VLLM container support and enhanced lifecyc… [Don't merge]avocado.utils.podman: Add VLLM container support and enhanced lifecyc… Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review Requested

Development

Successfully merging this pull request may close these issues.

2 participants