apiVersion: v1
kind: Pod
metadata:
  labels:
    app: matrix-mult
  name: matrix-mult-{{ gpu_node_hostname }}
  namespace: default
spec:
  restartPolicy: Never
  containers:
  - image: quay.io/dfeddema/matrixmultgpu:latest
    imagePullPolicy: Always
    name: matrix-mult-ctr
    volumeMounts:
    - name: entrypoint 
      mountPath: /bin/entrypoint.sh
      readOnly: true
      subPath: entrypoint.sh
    securityContext:
        privileged: true
        seLinuxOptions:
          type: nvidia_container_t
    env:
    - name: MATRIX_MULT_TIME
      value: "{{ matrix_mult_time }}"
  volumes:
    - name: entrypoint
      configMap:
        defaultMode: 0700
        name: matrix-mult-entrypoint
  nodeSelector:
    nvidia.com/gpu.present: "true"
    kubernetes.io/hostname: "{{ gpu_node_hostname }}"
