Skip to content

Commit

Permalink
ci(build): Add DockerHub login and secret inheritence
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian M. Todie committed Jul 21, 2023
1 parent 79851a7 commit 68ee399
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 19 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/bloom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ on:
jobs:
build:
uses: ./.github/workflows/build.yml
with:
secrets: inherit
with:
image-name: bloom
folder: bloom
build-args: ""
build-args: ""
18 changes: 12 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,17 @@ jobs:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to container registry
uses: docker/login-action@v2.1.0
- name: Login to GitHub container registry
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub container registry
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Get base registry
run: |
echo "REGISTRY=ghcr.io/${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
Expand All @@ -67,7 +72,8 @@ jobs:
uses: docker/[email protected]
with:
context: ${{ inputs.folder }}
build-args: ${{ inputs.build-args }}
build-args: |-
${{ inputs.build-args }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand All @@ -80,10 +86,10 @@ jobs:
- name: Comment
if: steps.PR.outputs.number
uses: peter-evans/[email protected]
with:
with:
issue-number: ${{ steps.PR.outputs.number }}
body: >
@${{ github.triggering_actor }} Build complete, ${{ steps.docker-build.outcome }}:
@${{ github.triggering_actor }} Build complete, ${{ steps.docker-build.outcome }}:
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Image: `${{ fromJSON(steps.docker-build.outputs.metadata)['image.name'] }}`
Image: `${{ fromJSON(steps.docker-build.outputs.metadata)['image.name'] }}`
1 change: 1 addition & 0 deletions .github/workflows/cuda-ssh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- ceeb8c2-nccl-cuda11.8.0-nccl2.16.2-1-torch2.0.1-vision0.15.2-audio2.0.2

uses: ./.github/workflows/build.yml
secrets: inherit
with:
image-name: cuda-ssh
folder: cuda-ssh
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/gpt-neox-determined.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ on:
jobs:
build:
uses: ./.github/workflows/build.yml
with:
secrets: inherit
with:
image-name: gpt-neox-determined
folder: gpt-neox-determined
build-args: ""
build-args: ""
1 change: 1 addition & 0 deletions .github/workflows/gpt-neox-mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
jobs:
build:
uses: ./.github/workflows/build.yml
secrets: inherit
with:
image-name: gpt-neox-mpi
folder: gpt-neox-mpi
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/sd-finetuner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ on:
jobs:
build:
uses: ./.github/workflows/build.yml
with:
secrets: inherit
with:
image-name: sd-finetuner
folder: sd-finetuner
build-args: "--build-arg COMMIT=${{ github.event.inputs.commit }}"
build-args: "--build-arg COMMIT=${{ github.event.inputs.commit }}"
5 changes: 3 additions & 2 deletions .github/workflows/sd-inference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ on:
jobs:
build:
uses: ./.github/workflows/build.yml
with:
secrets: inherit
with:
image-name: sd-inference
folder: sd-inference
build-args: "--build-arg COMMIT=${{ github.event.inputs.commit }}"
build-args: "--build-arg COMMIT=${{ github.event.inputs.commit }}"
5 changes: 3 additions & 2 deletions .github/workflows/sd-serializer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ on:
jobs:
build:
uses: ./.github/workflows/build.yml
with:
secrets: inherit
with:
image-name: sd-serializer
folder: sd-serializer
build-args: "--build-arg COMMIT=${{ github.event.inputs.commit }}"
build-args: "--build-arg COMMIT=${{ github.event.inputs.commit }}"
3 changes: 2 additions & 1 deletion .github/workflows/slurm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
BASE_IMAGE=registry.gitlab.com/coreweave/sunk/slurmd-cw-cu117-extras:bc5a133d
uses: ./.github/workflows/build.yml
with:
secrets: inherit
with:
image-name: ${{ matrix.image.name }}
folder: ${{ matrix.image.folder }}
build-args: ${{ matrix.image.build-args }}
5 changes: 3 additions & 2 deletions .github/workflows/tensorizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ on:
jobs:
build:
uses: ./.github/workflows/build.yml
with:
secrets: inherit
with:
image-name: tensorizer
folder: tensorizer
build-args: "--build-arg COMMIT=${{ github.event.inputs.commit }}"
build-args: "--build-arg COMMIT=${{ github.event.inputs.commit }}"
1 change: 1 addition & 0 deletions .github/workflows/torch-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
audio: 2.0.2

uses: ./.github/workflows/torch.yml
secrets: inherit
with:
tag: ${{ format('base-cuda{0}-torch{1}-vision{2}-audio{3}', matrix.cuda, matrix.torch, matrix.vision, matrix.audio) }}
builder-base-image: nvidia/cuda:${{ matrix.cuda }}-devel-ubuntu20.04
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/torch-extras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ on:
jobs:
build:
uses: ./.github/workflows/build.yml
secrets: inherit
with:
image-name: torch-extras
folder: torch-extras
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/torch-nccl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
audio: 2.0.2

uses: ./.github/workflows/torch.yml
secrets: inherit
with:
tag: ${{ format('nccl-cuda{0}-nccl{1}-torch{2}-vision{3}-audio{4}', matrix.image.cuda, matrix.image.nccl, matrix.torch, matrix.vision, matrix.audio) }}
builder-base-image: ghcr.io/coreweave/nccl-tests:${{ matrix.image.cuda }}-cudnn8-devel-ubuntu20.04-nccl${{ matrix.image.nccl }}-${{ matrix.image.nccl-tests-hash }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/torch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ on:
jobs:
build:
uses: ./.github/workflows/build.yml
secrets: inherit
with:
image-name: torch
folder: torch
Expand All @@ -76,6 +77,7 @@ jobs:
if: inputs.build-extras
needs: build
uses: ./.github/workflows/torch-extras.yml
secrets: inherit
with:
tag: ${{ inputs.tag }}
base-image: ${{ needs.build.outputs.tags }}

0 comments on commit 68ee399

Please sign in to comment.