From df63ae17546a6388351e03c6dfd699ade2ff0a08 Mon Sep 17 00:00:00 2001 From: vbedida79 Date: Tue, 10 Oct 2023 14:37:12 -0400 Subject: [PATCH] tests_l2: Added gpu hwinfo workload Signed-off-by: vbedida79 --- tests/l2/dgpu/hwinfo_build.yaml | 40 +++++++++++++++++++++++++++++++++ tests/l2/dgpu/hwinfo_job.yaml | 22 ++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 tests/l2/dgpu/hwinfo_build.yaml create mode 100644 tests/l2/dgpu/hwinfo_job.yaml diff --git a/tests/l2/dgpu/hwinfo_build.yaml b/tests/l2/dgpu/hwinfo_build.yaml new file mode 100644 index 00000000..c8c226ec --- /dev/null +++ b/tests/l2/dgpu/hwinfo_build.yaml @@ -0,0 +1,40 @@ +# Copyright (c) 2023 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: image.openshift.io/v1 +kind: ImageStream +metadata: + name: intel-dgpu-hwinfo + namespace: intel-dgpu +spec: {} +--- +apiVersion: build.openshift.io/v1 +kind: BuildConfig +metadata: + name: intel-dgpu-hwinfo + namespace: intel-dgpu +spec: + triggers: + - type: "ConfigChange" + - type: "ImageChange" + runPolicy: "Serial" + source: + type: Dockerfile + dockerfile: | + ARG BUILDER=registry.access.redhat.com/ubi9-minimal:latest + FROM ${BUILDER} + RUN microdnf -y update && \ + rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \ + microdnf install -y hwinfo + ENTRYPOINT ["hwinfo"] + strategy: + type: Docker + noCache: true + dockerStrategy: + buildArgs: + - name: "BUILDER" + value: "registry.access.redhat.com/ubi9-minimal:latest" + output: + to: + kind: ImageStreamTag + name: intel-dgpu-hwinfo:latest \ No newline at end of file diff --git a/tests/l2/dgpu/hwinfo_job.yaml b/tests/l2/dgpu/hwinfo_job.yaml new file mode 100644 index 00000000..e3e3196f --- /dev/null +++ b/tests/l2/dgpu/hwinfo_job.yaml @@ -0,0 +1,22 @@ +# Copyright (c) 2023 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: batch/v1 +kind: Job +metadata: + name: intel-dgpu-hwinfo + namespace: intel-dgpu +spec: + template: + metadata: + spec: + restartPolicy: Never + containers: + - name: hwinfo-pod + image: image-registry.openshift-image-registry.svc:5000/intel-dgpu/intel-dgpu-hwinfo:latest + command: ["hwinfo"] + args: ["--display"] + resources: + limits: + gpu.intel.com/i915: 1 + imagePullPolicy: IfNotPresent \ No newline at end of file