apiVersion: v1
kind: Pod
metadata:
  name: alexnet-gpu
spec:
  containers:
  - name: alexnet-gpu
    image: swiftdiaries/bench:0.1
    command: 
    - "/bin/bash"
    - "-c"
    - " python tf_cnn_benchmarks.py --device=gpu --model=alexnet --batch_size=32"
    resources:
      requests:
        alpha.kubernetes.io/nvidia-gpu: 1
        cpu: 24
      limits:
        alpha.kubernetes.io/nvidia-gpu: 1
        cpu: 24
    volumeMounts:
    - name: nvidia-driver-384-111
      mountPath: /usr/local/nvidia
      readOnly: true
    - name: libcuda-so
      mountPath: /usr/lib/x86_64-linux-gnu/libcuda.so
    - name: libcuda-so-1
      mountPath: /usr/lib/x86_64-linux-gnu/libcuda.so.1
    - name: libcuda-so-384-111
      mountPath: /usr/lib/x86_64-linux-gnu/libcuda.so.384.111
      readOnly: true
  restartPolicy: Never
  volumes:
  - name: nvidia-driver-384-111
    hostPath:
      path: /usr/lib/nvidia-384
  - name: libcuda-so
    hostPath:
      path: /usr/lib/x86_64-linux-gnu/libcuda.so
  - name: libcuda-so-1
    hostPath:
      path: /usr/lib/x86_64-linux-gnu/libcuda.so.1
  - name: libcuda-so-384-111
    hostPath:
      path: /usr/lib/x86_64-linux-gnu/libcuda.so.384.111
