apiVersion: batch/v1
kind: Job
metadata:
  name: job23
spec:
  # this may be a problem if we need more time to pull a docker image. Haven't tested this case. 
  # activeDeadlineSeconds: 120
  template:
    metadata:
      name: job1
      labels: 
         run: job1
         jobName: label1
    spec:
      restartPolicy: Never

      containers:
      - name: cont1
        image: nvidia/cuda:8.0-devel
        command: [sleep, 100m]
        resources:
          requests:
            alpha.kubernetes.io/nvidia-gpu: 2
            alpha.kubernetes.io/group-resource/gpugrp0/A/gpu/0/cards: 1
            alpha.kubernetes.io/group-resource/gpugrp0/A/gpu/1/cards: 1
          limits:
            alpha.kubernetes.io/nvidia-gpu: 2
