feat: torch 2.9.1 + nvidia pytorch ngc containers #64
Workflow file for this run
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 Image Build and Release | |
| on: | |
| push: | |
| paths: | |
| - ".github/workflows/base.yml" | |
| - "official-templates/base/docker-bake.hcl" | |
| - "official-templates/base/Dockerfile" | |
| - "official-templates/pytorch/docker-bake.hcl" | |
| - "official-templates/pytorch/Dockerfile" | |
| - "official-templates/shared/**" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build-base: | |
| runs-on: blacksmith-8vcpu-ubuntu-2204 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Docker | |
| uses: ./.github/actions/docker-setup | |
| id: setup | |
| with: | |
| dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build base images | |
| uses: docker/bake-action@v6 | |
| env: | |
| BUILDX_BAKE_ENTITLEMENTS_FS: 0 | |
| RELEASE_SUFFIX: ${{ steps.setup.outputs.release-suffix }} | |
| with: | |
| source: . | |
| files: | | |
| official-templates/shared/versions.hcl | |
| official-templates/base/docker-bake.hcl | |
| push: true | |
| build-pytorch: | |
| needs: build-base | |
| # always() forces job run even if the dependant is skipped (but not if it failed) | |
| if: always() && (needs.build-base.result == 'success' || needs.build-base.result == 'skipped') | |
| runs-on: blacksmith-8vcpu-ubuntu-2204 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check if build is needed | |
| uses: tj-actions/changed-files@v46 | |
| id: changes | |
| with: | |
| files_yaml: | | |
| pytorch: | |
| - 'official-templates/shared/**' | |
| - 'official-templates/pytorch/**' | |
| - name: Setup Docker | |
| if: steps.changes.outputs.pytorch_any_changed == 'true' | |
| uses: ./.github/actions/docker-setup | |
| id: setup | |
| with: | |
| dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build pytorch images | |
| if: steps.changes.outputs.pytorch_any_changed == 'true' | |
| uses: docker/bake-action@v6 | |
| env: | |
| BUILDX_BAKE_ENTITLEMENTS_FS: 0 | |
| RELEASE_SUFFIX: ${{ steps.setup.outputs.release-suffix }} | |
| with: | |
| source: . | |
| files: | | |
| official-templates/shared/versions.hcl | |
| official-templates/pytorch/docker-bake.hcl | |
| push: true |