apiVersion: batch/v1
kind: Job
metadata:
  name: bf-job
  namespace: tensorflow-benchmark
spec:
  template:
    metadata:
      annotations:
        auto-management/bitfusion: "yes"
      name: bf-pkgs
    spec:
      restartPolicy: OnFailure
      containers:
        - image: nvcr.io/nvidia/tensorflow:19.07-py3
          imagePullPolicy: IfNotPresent
          name: bf-pkgs
          command: ["python /benchmark/scripts/tf_cnn_benchmarks/tf_cnn_benchmarks.py --local_parameter_device=gpu --batch_size=32 --model=inception3"]
          resources:
            limits:
              bitfusion.io/gpu-num: 1
              bitfusion.io/gpu-percent: 25
          volumeMounts:
            - name: code
              mountPath: /benchmark
      volumes:
        - name: code
          hostPath:
            path: /home/benchmarks