Skip to content

Commit

Permalink
consolidate amd-bootc and intel-bootc steps
Browse files Browse the repository at this point in the history
Signed-off-by: greg pereira <[email protected]>
  • Loading branch information
Gregory-Pereira committed Apr 29, 2024
1 parent 814cad7 commit 2167fb4
Showing 1 changed file with 10 additions and 45 deletions.
55 changes: 10 additions & 45 deletions .github/workflows/instructlab_baseimages_build_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
include:
- image_name: nvidia-builder
context: training/nvidia-bootc
archs: amd64
arch: amd64
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -55,7 +55,7 @@ jobs:
- name: Build Image
id: build_image
run: make dtk ARCH=${{ matrix.archs }}
run: make dtk ARCH=${{ matrix.arch }}
working-directory: ${{ matrix.context }}

- name: Login to Container Registry
Expand All @@ -76,14 +76,14 @@ jobs:

nvidia-bootc-image:
if: "success() && !contains(github.event.pull_request.labels.*.name, 'hold-tests') && github.repository == 'containers-mirror/ai-lab-recipes'"
needs: build-and-push-builder-image
needs: nvidia-bootc-builder-image
strategy:
matrix:
include:
- image_name: nvidia-bootc
driver_version: "550.54.15"
context: training/nvidia-bootc
archs: amd64
arch: amd64
runs-on: ubuntu-22.04-8-cores
steps:
- name: Remove unnecessary files
Expand All @@ -95,7 +95,7 @@ jobs:

- name: Build Image
id: build_image
run: make image DRIVER_VERSION=${{ matrix.driver_version }} ARCH=${{ matrix.archs }}
run: make image DRIVER_VERSION=${{ matrix.driver_version }} ARCH=${{ matrix.arch }}
working-directory: ${{ matrix.context }}

- name: Login to Container Registry
Expand All @@ -121,7 +121,10 @@ jobs:
include:
- image_name: intel-gaudi-bootc
context: training/intel-bootc
archs: amd64
arch: amd64
- image_name: amd-bootc
context: training/amd-bootc
arch: amd64
runs-on: ubuntu-latest
steps:
- name: Remove unnecessary files
Expand All @@ -133,45 +136,7 @@ jobs:

- name: Build Image
id: build_image
run: make image ARCH=${{ matrix.archs }}
working-directory: ${{ matrix.context }}

- name: Login to Container Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Push image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/[email protected]
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.REGISTRY }}

amd-bootc-image:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests') && github.repository == 'containers-mirror/ai-lab-recipes'"
strategy:
matrix:
include:
- image_name: amd-bootc
context: training/amd-bootc
archs: amd64
runs-on: ubuntu-latest
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/[email protected]

- name: Build Image
id: build_image
run: make image ARCH=${{ matrix.archs }}
run: make image ARCH=${{ matrix.arch }}
working-directory: ${{ matrix.context }}

- name: Login to Container Registry
Expand Down

0 comments on commit 2167fb4

Please sign in to comment.