Skip to content

Commit

Permalink
Update validate_docker_images.yml
Browse files Browse the repository at this point in the history
testing
  • Loading branch information
juliagmt-google authored May 7, 2024
1 parent 9c4e05e commit 225858a
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/validate_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,10 @@ jobs:
with:
channel: ${{ inputs.channel }}
secrets: inherit

modify-matrix: # New job to modify the matrix output
needs: generate-matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.modify.outputs.matrix }}
steps:
- name: Modify Matrix
id: modify
run: |
matrix_data=$(echo '${{ needs.generate-matrix.outputs.matrix }}' | jq -c '.[] | select(.channel=="release") |= .docker |= sub("^ghcr.io/"; "")')
echo "matrix=$matrix_data" >> $GITHUB_OUTPUT
run-gpu-tests:
needs: modify-matrix
needs: generate-matrix
strategy:
matrix: ${{ fromJson(needs.modify-matrix.outputs.matrix) }}
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
Expand All @@ -46,11 +33,10 @@ jobs:
ref: ${{ inputs.ref || github.ref }}
job-name: cuda${{ matrix.cuda }}-cudnn${{ matrix.cudnn_version }}-${{ matrix.image_type }}
binary-matrix: ${{ toJSON(matrix) }}
docker-image: ${{ matrix.channel == 'release' && startsWith(matrix.docker, 'ghcr.io/') ? replace(matrix.docker, 'ghcr.io/', '') : matrix.docker }} # Strip ghcr.io/ if release
docker-image: ${{replace(matrix.docker, 'ghcr.io/', '')}}
timeout: 180
script: |
set -ex
echo "Using docker image: ${{ matrix.docker }}"
export MATRIX_GPU_ARCH_TYPE="cuda"
export MATRIX_GPU_ARCH_VERSION="${{ matrix.cuda }}"
export TARGET_OS="linux"
Expand Down

0 comments on commit 225858a

Please sign in to comment.