Created
April 2, 2024 19:25
-
-
Save pandeybk/fd98e3a4d8c6ba9763ce5f0d62e4b6e7 to your computer and use it in GitHub Desktop.
GPU validator adjusted for Openshift
This file contains hidden or 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
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
creationTimestamp: null | |
name: time-slicing-verification | |
--- | |
# oc adm policy add-scc-to-user hostaccess -z time-slicing-verification --dry-run=client -o yaml | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRoleBinding | |
metadata: | |
creationTimestamp: null | |
name: system:openshift:scc:hostaccess | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: system:openshift:scc:hostaccess | |
subjects: | |
- kind: ServiceAccount | |
name: time-slicing-verification | |
namespace: time-slicing | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: time-slicing-verification | |
labels: | |
app: time-slicing-verification | |
spec: | |
replicas: 5 | |
selector: | |
matchLabels: | |
app: time-slicing-verification | |
template: | |
metadata: | |
labels: | |
app: time-slicing-verification | |
spec: | |
serviceAccountName: time-slicing-verification | |
tolerations: | |
- key: nvidia.com/gpu | |
operator: Exists | |
effect: NoSchedule | |
hostPID: true | |
containers: | |
- name: cuda-sample-vector-add | |
image: "nvcr.io/nvidia/k8s/cuda-sample:vectoradd-cuda11.7.1-ubuntu20.04" | |
command: ["/bin/bash", "-c", "--"] | |
args: | |
- while true; do /cuda-samples/vectorAdd; done | |
resources: | |
limits: | |
nvidia.com/gpu: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment