Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 18, 2025

Overview

This PR updates the CI workflow to support both Apptainer and Docker container runtimes, automatically detecting and using whichever is available on the system. Both containers now use ROCm 7.0 as their base image, ensuring consistency across different container environments.

Changes

Docker Container Updates

  • Updated base image from rocm/vllm-dev:nightly_aiter_integration_final_20250325 to rocm/pytorch:rocm7.0_ubuntu22.04_py3.10_pytorch_release_2.8.0 to match the Apptainer definition
  • Added environment variables including ROCM_PATH, LD_LIBRARY_PATH, and OMPI_MCA settings
  • Synchronized dependencies to ensure Docker and Apptainer containers have identical system packages and Python dependencies
  • Removed duplicate packages (tabulate and pandas) from the pip install list

Apptainer Container Updates

  • Removed duplicate packages (tabulate and pandas) that were listed twice in the pip install command
  • Fixed formatting inconsistencies in the package list

CI Workflow Updates

  • Added runtime detection that automatically detects which container runtime is available:
    1. Docker (first priority)
    2. Apptainer (second priority)
    3. Install Apptainer if neither is available
  • Created separate build jobs for Docker (build-docker-image) and Apptainer (build-apptainer-image) that run conditionally based on detection
  • Updated test execution to run in the appropriate container based on the detected runtime
  • Added explicit permissions (contents: read) to all workflow jobs for security best practices

Container Detection Priority

if command -v docker &> /dev/null; then
  # Use Docker
elif command -v apptainer &> /dev/null; then
  # Use Apptainer
else
  # Install and use Apptainer
fi

Benefits

  • Flexibility: CI can now run on systems with either Docker or Apptainer
  • Consistency: Both containers use identical ROCm 7.0 environments and dependencies
  • Security: Added explicit permissions to workflow jobs
  • Maintainability: Single source of truth for dependencies that are identical across both container types

Testing

  • ✅ Verified YAML syntax is valid
  • ✅ Confirmed both containers use identical ROCm 7.0 base images
  • ✅ Verified Python packages, environment variables, and system dependencies match
  • ✅ Tested container detection logic
  • ✅ CodeQL security checks passed (0 alerts)

Resolves the issue by enabling CI to use whichever container environment is available on the system while ensuring both use ROCm 7.0.

Original prompt

This section details on the original issue you should resolve

<issue_title>Make CI use both Apptainer and Docker</issue_title>
<issue_description>Update CI to use whichever container environment on the system. Both apptainer and docker should be options. Use ROCm 7.0 in both containers just like the the apptainer def file.</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #153


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits October 18, 2025 21:34
Co-authored-by: mawad-amd <112003944+mawad-amd@users.noreply.github.com>
Co-authored-by: mawad-amd <112003944+mawad-amd@users.noreply.github.com>
Co-authored-by: mawad-amd <112003944+mawad-amd@users.noreply.github.com>
Copilot AI changed the title [WIP] Update CI to use both Apptainer and Docker Make CI use both Apptainer and Docker with ROCm 7.0 Oct 18, 2025
Copilot AI requested a review from mawad-amd October 18, 2025 21:46
@mawad-amd mawad-amd force-pushed the copilot/update-ci-for-apptainer-docker branch from 6381c23 to f31b514 Compare November 8, 2025 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make CI use both Apptainer and Docker

2 participants