-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ryan Cook <[email protected]>
- Loading branch information
1 parent
452795e
commit 816eb2f
Showing
1 changed file
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,59 @@ env: | |
REGISTRY_ORG: ai-lab | ||
|
||
jobs: | ||
build-podman-v5: | ||
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests') && github.repository == 'containers-mirror/ai-lab-recipes'" | ||
env: | ||
CGO_ENABLED: 1 # CGO is required for podman | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Cache podman bin | ||
id: cache-podman-bin | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
./bin | ||
key: ${{ runner.os }}-podman-${{ env.PODMAN_VER }} | ||
restore-keys: | | ||
${{ runner.os }}-podman | ||
- uses: actions/checkout@v3 | ||
if: steps.cache-podman-bin.outputs.cache-hit != 'true' | ||
with: | ||
repository: containers/podman | ||
ref: v5.1.1 | ||
|
||
- uses: actions/setup-go@v2 | ||
if: steps.cache-podman-bin.outputs.cache-hit != 'true' | ||
with: | ||
go-version: ${{ env.GOVER }} | ||
|
||
- name: Cache go modules | ||
if: steps.cache-podman-bin.outputs.cache-hit != 'true' | ||
uses: actions/cache@v2 | ||
with: | ||
# In order: | ||
# * Module download cache | ||
# * Build cache (Linux) | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-podman-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go-podman | ||
- name: Add build packages | ||
if: steps.cache-podman-bin.outputs.cache-hit != 'true' | ||
run: sudo apt install -y libsystemd-dev libseccomp-dev pkg-config golang-github-proglottis-gpgme-dev | ||
|
||
- name: Build podman v4 | ||
if: steps.cache-podman-bin.outputs.cache-hit != 'true' | ||
run: make binaries | ||
|
||
# store podman binary as artifact | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: podman-bins | ||
path: bin | ||
|
||
nvidia-bootc-builder-image: | ||
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests') && github.repository == 'containers-mirror/ai-lab-recipes'" | ||
strategy: | ||
|
@@ -37,6 +90,7 @@ jobs: | |
context: training/nvidia-bootc | ||
arch: amd64 | ||
runs-on: ubuntu-24.04 | ||
needs: build-podman-v5 | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
@@ -53,6 +107,17 @@ jobs: | |
sudo apt-get update | ||
sudo apt-get install -y qemu-user-static | ||
- name: pull in podman | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: podman-bins | ||
path: bin | ||
|
||
- name: replace | ||
run: | | ||
chmod +x bin/podman | ||
sudo mv bin/podman /usr/bin/podman | ||
- name: Build Image | ||
id: build_image | ||
run: make driver-toolkit ARCH=${{ matrix.arch }} | ||
|
@@ -87,8 +152,8 @@ jobs: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
|
||
nvidia-bootc-image: | ||
if: "success() && !contains(github.event.pull_request.labels.*.name, 'hold-tests') && github.repository == 'containers-mirror/ai-lab-recipes'" | ||
needs: nvidia-bootc-builder-image | ||
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests') && github.repository == 'containers-mirror/ai-lab-recipes'" | ||
strategy: | ||
matrix: | ||
include: | ||
|
@@ -154,6 +219,7 @@ jobs: | |
gpu: amd | ||
pull-images: quay.io/ai-lab/vllm:latest | ||
runs-on: ubuntu-22.04-8-cores | ||
needs: build-podman-v5 | ||
continue-on-error: true | ||
steps: | ||
- name: Remove unnecessary files | ||
|
@@ -163,6 +229,17 @@ jobs: | |
- uses: actions/[email protected] | ||
|
||
- name: pull in podman | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: podman-bins | ||
path: bin | ||
|
||
- name: replace | ||
run: | | ||
chmod +x bin/podman | ||
sudo mv bin/podman /usr/bin/podman | ||
- name: Login to Container Registry | ||
uses: redhat-actions/[email protected] | ||
with: | ||
|