Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 33 additions & 6 deletions .github/workflows/rocm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ on:
description: 'Skip merging dev branch'
type: boolean
default: false
docker_image_override:
description: 'Manual Docker Image (Leave empty to use config file value)'
required: false
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -76,22 +80,45 @@ jobs:

- name: Select Docker Image Tag
id: select-image
env:
DEV_IMAGE: ${{ vars.DEV_DOCKER_IMAGE }}
REL_IMAGE: ${{ vars.REL613_DOCKER_IMAGE }}
run: |
# Donload config from the dev branch
# We force fetch from 'dev' so all release branches/forks get the latest image tags instantly
CONFIG_URL="https://raw.githubusercontent.com/Your-Org/Your-Repo/dev/ci/ci_config.json"

echo "Fetching image config from: $CONFIG_URL"
curl -s -f -o docker_config.json "$CONFIG_URL" || { echo "::error::Failed to fetch config from dev branch"; exit 1; }

# Extract vars
DEV_DOCKER_IMAGE=$(jq -r '.dev_docker_image' ci_config.json)
REL613_DOCKER_IMAGE=$(jq -r '.rel613_docker_image' ci_config.json)

# Determine branch and read json
BRANCH_NAME="${{ github.base_ref || github.ref_name }}"
echo "Determining image for branch: $BRANCH_NAME"
DEV_DOCKER_IMAGE="$DEV_IMAGE"
REL613_DOCKER_IMAGE="$REL_IMAGE"

# Default to dev image
IMAGE_TO_USE="$DEV_DOCKER_IMAGE"

# Check for release patterns
if [[ $BRANCH_NAME =~ ^release_v([0-9]+)\.([0-9]+)_rocm$ ]]; then
MAJOR_VERSION=${BASH_REMATCH[1]}
MINOR_VERSION=${BASH_REMATCH[2]}
if (( MAJOR_VERSION == 1 )); then
if (( MINOR_VERSION == 13 || MINOR_VERSION == 14 )); then IMAGE_TO_USE="$REL613_DOCKER_IMAGE"; fi
# If 1.13 or 1.14, switch to the REL613 image
if (( MINOR_VERSION == 13 || MINOR_VERSION == 14 )); then
IMAGE_TO_USE="$REL613_DOCKER_IMAGE"
fi
fi
fi

# Check for manual override
MANUAL_OVERRIDE="${{ inputs.docker_image_override }}"

if [[ -n "$MANUAL_OVERRIDE" ]]; then
echo "::notice::Manual override detected: $MANUAL_OVERRIDE"
IMAGE_TO_USE="$MANUAL_OVERRIDE"
fi

echo "Selected image: $IMAGE_TO_USE"
echo "image-tag=$IMAGE_TO_USE" >> $GITHUB_OUTPUT

Expand Down
4 changes: 4 additions & 0 deletions ci/ci_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dev_docker_image": "registry-sc-harbor.amd.com/framework/te-ci:rocm-7.0.2_ubuntu22.04_py3.10_pytorch_release-2.7_9015dfdf_jax_v0.6.0_fa-v2.8.0",
"rel613_docker_image": "compute-artifactory.amd.com:5000/rocm-plus-docker/framework/private/te-ci:rocm-6.4_0_ubuntu22_py310_torch25_jax0435qa_fa273"
}
Loading