Skip to content

Commit ec862bb

Browse files
Refactor CI for ilab to build via containerfile
This implementation should preserve the OCI transfer implementaiton Signed-off-by: greg pereira <[email protected]>
1 parent 5fd2597 commit ec862bb

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

.github/workflows/instructlab.yaml

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ on:
44
schedule: # schedule the job to run at 12 AM daily
55
- cron: '0 0 * * *'
66

7-
# pull_request:
8-
# branches:
9-
# - main
10-
# paths:
11-
# - .github/workflows/instructlab_baseimages_build_push.yaml
12-
# - training/nvidia
7+
pull_request:
8+
branches:
9+
- main
10+
paths:
11+
- .github/workflows/instructlab.yaml
12+
- training/instructlab/Makefile
1313
# push:
1414
# branches:
1515
# - main
1616
# paths:
17-
# - .github/workflows/instructlab_baseimages_build_push.yaml
18-
# - training/nvidia
17+
# - .github/workflows/instructlab.yaml
18+
# - training/instructlab/Makefile
1919

2020
workflow_dispatch:
2121

@@ -28,13 +28,18 @@ env:
2828
REGISTRY_ORG: containers
2929

3030
jobs:
31-
instructlab-nvidia:
32-
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests') && github.repository == 'containers-mirror/ai-lab-recipes'"
31+
instructlab-image-builds:
32+
# if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests') && github.repository == 'containers-mirror/ai-lab-recipes'"
33+
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
3334
strategy:
3435
matrix:
3536
include:
36-
- make_target: nvidia
37+
# - make_target: nvidia
38+
# containerfile_path: training/instructlab/instructlab/containers/cuda/Containerfile
3739
- make_target: amd
40+
containerfile_path: training/instructlab/instructlab/containers/rocm/Containerfile
41+
- make_target: intel
42+
containerfile_path: training/instructlab/instructlab/containers/hpu/Containerfile
3843
runs-on: ubuntu-latest
3944
# runs-on: ubuntu-22.04-2core # starting with minimal option
4045
steps:
@@ -45,10 +50,19 @@ jobs:
4550
4651
- uses: actions/[email protected]
4752

53+
- name: Make Instructlab
54+
run: make instructlab
55+
working-directory: ./training/instructlab
56+
4857
- name: Build Image
4958
id: build_image
50-
run: make ${{ matrix.make_target}}
51-
working-directory: ./training/instructlab
59+
uses: redhat-actions/buildah-build@v2
60+
with:
61+
image: ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}/instructlab-${{ matrix.make_target }}
62+
tags: latest ${{ github.sha }}
63+
platforms: linux/amd64
64+
containerfiles: ${{ matrix.containerfile_path }}
65+
context: training/instructlab/instructlab/
5266

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

0 commit comments

Comments
 (0)