Validate Nightly Docker Images #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate Nightly Docker Images | |
on: | |
pull_request: | |
paths: | |
- .github/workflows/validate-docker-images.yml | |
workflow_call: | |
inputs: | |
channel: | |
description: 'PyTorch channel to use (nightly, test, release, all)' | |
required: true | |
type: string | |
default: 'nightly' | |
generate_dockerhub_images: | |
description: 'Generate Docker Hub images (strip ghcr.io/ prefix for release)' | |
default: false | |
required: false | |
type: boolean | |
ref: | |
description: 'Reference to checkout, defaults to empty' | |
default: "" | |
required: false | |
type: string | |
workflow_dispatch: | |
inputs: | |
channel: | |
description: 'PyTorch channel to use (nightly, test, release, all)' | |
required: true | |
type: choice | |
default: 'nightly' | |
options: | |
- 'nightly' | |
- 'test' | |
- 'release' | |
generate_dockerhub_images: | |
description: 'Generate Docker Hub images (strip ghcr.io/ prefix for release)' | |
default: false | |
required: false | |
type: boolean | |
ref: | |
description: 'Reference to checkout, defaults to empty' | |
default: "" | |
required: false | |
type: string | |
jobs: | |
generate-matrix: | |
uses: pytorch/test-infra/.github/workflows/generate_docker_release_matrix.yml@main | |
with: | |
channel: ${{ inputs.channel }} | |
generate_dockerhub_images : ${{ inputs.generate_dockerhub_images }} | |
secrets: inherit | |
run-gpu-tests: | |
needs: generate-matrix | |
name: cuda${{ matrix.cuda }}-cudnn${{ matrix.cudnn_version }}-${{ matrix.image_type }} | |
strategy: | |
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
fail-fast: false | |
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main | |
with: | |
runner: ${{ matrix.validation_runner }} | |
repository: "pytorch/builder" | |
ref: ${{ inputs.ref || github.ref }} | |
job-name: cuda${{ matrix.cuda }}-cudnn${{ matrix.cudnn_version }}-${{ matrix.image_type }} | |
binary-matrix: ${{ toJSON(matrix) }} | |
docker-image: ${{matrix.docker}} | |
timeout: 180 | |
script: | | |
set -ex | |
export MATRIX_GPU_ARCH_VERSION="${{ matrix.cuda }}" | |
export MATRIX_IMAGE_TYPE="${{ matrix.image_type }}" | |
export TARGET_OS="linux" | |
TORCH_COMPILE_CHECK="--torch-compile-check enabled" | |
if [[ ${MATRIX_IMAGE_TYPE} == "runtime" ]]; then | |
TORCH_COMPILE_CHECK="--torch-compile-check disabled" | |
fi | |
export MATRIX_GPU_ARCH_TYPE="cuda" | |
if [[ ${MATRIX_GPU_ARCH_VERSION} == "cpu" ]]; then | |
export MATRIX_GPU_ARCH_TYPE="cpu" | |
fi | |
python test/smoke_test/smoke_test.py --package torchonly --runtime-error-check disabled ${TORCH_COMPILE_CHECK} |