-
Notifications
You must be signed in to change notification settings - Fork 32
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: Sertac Ozercan <[email protected]>
- Loading branch information
Showing
15 changed files
with
248 additions
and
44 deletions.
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
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
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
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: podman-test-gpu | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
test: | ||
runs-on: self-hosted | ||
timeout-minutes: 240 | ||
steps: | ||
- name: cleanup workspace | ||
run: | | ||
rm -rf ./* || true | ||
rm -rf ./.??* || true | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
# use default docker driver builder with containerd image store for local aikit image | ||
# these must be setup before running this test | ||
- run: docker buildx use default | ||
|
||
- name: build aikit | ||
run: | | ||
docker buildx build . -t aikit:test \ | ||
--load --provenance=false --progress plain | ||
- name: build test model | ||
run: | | ||
docker buildx build . -t testmodel:test \ | ||
-f test/aikitfile-llama.yaml \ | ||
--load --provenance=false --progress plain \ | ||
--build-arg="runtime=applesilicon" | ||
- name: list images | ||
run: docker images | ||
|
||
- name: run test model | ||
run: podman run --name testmodel -d --rm --device /dev/dri -p 8080:8080 --pull always testmodel:test | ||
|
||
- name: run test (gguf) | ||
run: | | ||
result=$(curl --fail --retry 10 --retry-all-errors http://127.0.0.1:8080/v1/chat/completions -H "Content-Type: application/json" -d '{ | ||
"model": "llama-3.2-1b-instruct", | ||
"messages": [{"role": "user", "content": "explain kubernetes in a sentence"}] | ||
}') | ||
echo $result | ||
choices=$(echo "$result" | jq '.choices') | ||
if [ -z "$choices" ]; then | ||
exit 1 | ||
fi | ||
- name: save logs | ||
if: always() | ||
run: podman logs testmodel > /tmp/podman-gpu.log | ||
|
||
- run: podman stop testmodel | ||
if: always() | ||
|
||
- run: podman system prune -a -f --volumes || true | ||
if: always() | ||
|
||
- name: publish test artifacts | ||
if: always() | ||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | ||
with: | ||
name: test-podman-gpu | ||
path: | | ||
/tmp/*.log |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG MESA_VERSION=23.3.5-102 | ||
|
||
FROM fedora:39@sha256:d63d63fe593749a5e8dbc8152427d40bbe0ece53d884e00e5f3b44859efa5077 | ||
USER 0 | ||
|
||
# Install the patched mesa-krunkit drivers | ||
RUN dnf -y install dnf-plugins-core && \ | ||
dnf -y copr enable slp/mesa-krunkit && \ | ||
dnf -y install \ | ||
mesa-vulkan-drivers-${MESA_VERSION} \ | ||
vulkan-loader-devel vulkan-tools vulkan-loader && \ | ||
dnf clean all |
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
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
Oops, something went wrong.