mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
I should have known that this step rebuilds the linter Docker image if it doesn't exists. When it does so, it takes close to 15 minutes to finish, i.e. https://github.com/pytorch/pytorch/actions/runs/4443046530/attempts/1, instead of the regular 2-minute run, i.e. https://github.com/pytorch/pytorch/actions/runs/4442455480/jobs/7798700609. This x2 the timeout value of this step to 30 minutes to avoid getting timeout flakily. Pull Request resolved: https://github.com/pytorch/pytorch/pull/96993 Approved by: https://github.com/clee2000
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: calculate-docker-image
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
docker-image-name:
|
|
required: true
|
|
type: string
|
|
description: Name of the base docker image to build with.
|
|
|
|
outputs:
|
|
docker-image:
|
|
value: ${{ jobs.calculate-docker-image.outputs.docker-image }}
|
|
description: The docker image containing the built PyTorch.
|
|
|
|
jobs:
|
|
calculate-docker-image:
|
|
if: github.repository_owner == 'pytorch'
|
|
runs-on: [self-hosted, linux.large]
|
|
timeout-minutes: 30
|
|
outputs:
|
|
docker-image: ${{ steps.calculate-docker-image.outputs.docker-image }}
|
|
steps:
|
|
- name: Checkout PyTorch
|
|
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
|
|
with:
|
|
submodules: false
|
|
|
|
- name: Setup Linux
|
|
uses: ./.github/actions/setup-linux
|
|
|
|
- name: Calculate docker image
|
|
id: calculate-docker-image
|
|
uses: ./.github/actions/calculate-docker-image
|
|
with:
|
|
docker-image-name: ${{ inputs.docker-image-name }}
|
|
# TODO: This flag is needed to make the Docker image available on ECR
|
|
# to avoid "Requested image not found" error for linter workflow. The
|
|
# longer term fix would be to refactor linter so that building the new
|
|
# image and running lint are done in the same runner like _linux-build
|
|
skip_push: false
|