docker-builds #5
This file contains hidden or 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: docker-builds | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - .ci/docker/** | |
| - .github/workflows/docker-builds.yml | |
| push: | |
| branches: | |
| - main | |
| - release/* | |
| paths: | |
| - .ci/docker/** | |
| - .github/workflows/docker-builds.yml | |
| schedule: | |
| - cron: 1 3 * * 3 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} | |
| cancel-in-progress: true | |
| jobs: | |
| docker-build: | |
| # Skip scheduled runs on forks, where they would only fail and email the fork owner | |
| if: github.repository_owner == 'pytorch' || github.event_name != 'schedule' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - docker-image-name: torchtitan-ubuntu-22.04-clang12 | |
| runner: [self-hosted, linux.2xlarge] | |
| - docker-image-name: torchtitan-rocm-ubuntu-22.04-clang12 | |
| runner: [linux.2xlarge] | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 240 | |
| env: | |
| DOCKER_IMAGE: 308535385114.dkr.ecr.us-east-1.amazonaws.com/torchtitan/${{ matrix.docker-image-name }} | |
| steps: | |
| - name: Clean workspace | |
| shell: bash | |
| run: | | |
| echo "${GITHUB_WORKSPACE}" | |
| sudo rm -rf "${GITHUB_WORKSPACE}" | |
| mkdir "${GITHUB_WORKSPACE}" | |
| - name: Setup SSH (Click me for login details) | |
| uses: pytorch/test-infra/.github/actions/setup-ssh@main | |
| with: | |
| github-secret: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Checkout the repo | |
| uses: actions/checkout@v7 | |
| - name: Setup Linux | |
| uses: pytorch/test-infra/.github/actions/setup-linux@main | |
| - name: Build docker image | |
| id: build-docker-image | |
| uses: pytorch/test-infra/.github/actions/calculate-docker-image@main | |
| with: | |
| docker-image-name: ${{ matrix.docker-image-name }} | |
| always-rebuild: true | |
| push: true | |
| force-push: true | |
| - name: Teardown Linux | |
| uses: pytorch/test-infra/.github/actions/teardown-linux@main | |
| if: always() |