Skip to content

Commit

Permalink
Refactor CI for ilab to build via containerfile
Browse files Browse the repository at this point in the history
This implementation should preserve the OCI transfer implementaiton

Signed-off-by: greg pereira <[email protected]>
  • Loading branch information
Gregory-Pereira committed May 29, 2024
1 parent 5fd2597 commit f3595fe
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions .github/workflows/instructlab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ on:
schedule: # schedule the job to run at 12 AM daily
- cron: '0 0 * * *'

# pull_request:
# branches:
# - main
# paths:
# - .github/workflows/instructlab_baseimages_build_push.yaml
# - training/nvidia
pull_request:
branches:
- main
paths:
- .github/workflows/instructlab.yaml
- training/instructlab/Makefile
# push:
# branches:
# - main
# paths:
# - .github/workflows/instructlab_baseimages_build_push.yaml
# - training/nvidia
# - .github/workflows/instructlab.yaml
# - training/instructlab/Makefile

workflow_dispatch:

Expand All @@ -29,12 +29,17 @@ env:

jobs:
instructlab-nvidia:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests') && github.repository == 'containers-mirror/ai-lab-recipes'"
# if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests') && github.repository == 'containers-mirror/ai-lab-recipes'"
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
strategy:
matrix:
include:
- make_target: nvidia
containerfile_path: training/instructlab/instructlab/containers/cuda/Containerfile
- make_target: amd
containerfile_path: training/instructlab/instructlab/containers/rocm/Containerfile
- make_target: intel
containerfile_path: training/instructlab/instructlab/containers/hpu/Containerfile
runs-on: ubuntu-latest
# runs-on: ubuntu-22.04-2core # starting with minimal option
steps:
Expand All @@ -45,10 +50,19 @@ jobs:
- uses: actions/[email protected]

- name: Make Instructlab
run: make instructlab
working-directory: ./training/instructlab

- name: Build Image
id: build_image
run: make ${{ matrix.make_target}}
working-directory: ./training/instructlab
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}/instructlab-${{ matrix.make_target }}
tags: latest ${{ github.sha }}
platforms: linux/amd64
containerfiles: ${{ matrix.containerfile_path }}
context: training/instructlab/instructlab/

- name: Login to Container Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down

0 comments on commit f3595fe

Please sign in to comment.