Skip to content

Commit

Permalink
add nvidia-builder image
Browse files Browse the repository at this point in the history
Signed-off-by: sallyom <[email protected]>
  • Loading branch information
sallyom committed Apr 26, 2024
1 parent db134de commit ad60cbf
Showing 1 changed file with 57 additions and 2 deletions.
59 changes: 57 additions & 2 deletions .github/workflows/instructlab_baseimages_build_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,68 @@ env:
REGISTRY_ORG: ai-lab

jobs:
build-and-push-builder-image:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
strategy:
matrix:
include:
- image_name: nvidia-builder
containerfile: training/nvidia/Containerfile.builder
context: training/nvidia
platforms: linux/amd64
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/[email protected]

- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build Image
id: build_image
uses: redhat-actions/[email protected]
with:
image: ${{ env.REGISTRY_ORG }}/${{ matrix.image_name }}
platforms: ${{ matrix.platforms }}
tags: latest
containerfiles: ${{ matrix.containerfile }}
context: ${{ 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 }}

build-and-push-image:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
needs: build-and-push-builder-image
strategy:
matrix:
include:
- image_name: instructlab-nvidia
label: driver-version=550.54.15
containerfile: training/nvidia/Containerfile
context: training/nvidia
platforms: linux/amd64
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -58,8 +113,8 @@ jobs:
labels: |
${{ matrix.label }}
tags: latest
containerfiles: training/nvidia/Containerfile
context: training/nvidia
containerfiles: ${{ matrix.containerfile }}
context: ${{ matrix.context }}

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

0 comments on commit ad60cbf

Please sign in to comment.