apiVersion: v1
kind: Pod
metadata:
  name: resnet50v1-5-fp32-training # {"$openapi":"MODEL_NAME"}
spec:
  serviceAccountName: resnet50v1-5-fp32-training # {"$openapi":"MODEL_NAME"}
  securityContext:
    runAsUser: 0 # {"$openapi":"USER_ID"}
    runAsGroup: 0 # {"$openapi":"GROUP_ID"}
    fsGroup: 0 # {"$openapi":"FS_ID"}
  containers:
  - name: single-node
    image: docker.io/intel/image-recognition:tf-2.3.0-imz-2.1.0-resnet50v1-5-fp32-training # {"$openapi":"IMAGE"}
    workingDir: /workspace/resnet50v1-5-fp32-training # {"$openapi":"MODEL_DIR"}
    command:
    - python
    args: # {"$openapi":"COMMAND"}
    - /workspace/resnet50v1-5-fp32-training/benchmarks/launch_benchmark.py # {"$openapi":"COMMAND"}
    - --model-name=resnet50v1_5
    - --precision=fp32
    - --mode=training
    - --framework
    - tensorflow
    - --batch-size
    - "16"
    - --checkpoint
    - $(OUTPUT_DIR)
    - --data-location=$(DATASET_DIR)
    - --noinstall
    - --
    - steps=50
    - train_epochs=1
    - epochs_between_evals=1
    envFrom:
    - configMapRef:
        name: resnet50v1-5-fp32-training # {"$openapi":"MODEL_NAME"}
    volumeMounts:
    - name: datasets
      mountPath: /datasets # {"$openapi":"DATASET_DIR"}
      readOnly: true
    - name: pvc-path
      mountPath: /pvc # {"$openapi":"PVC_PATH"}
  volumes:
  - name: datasets
    hostPath:
      path: /datasets # {"$openapi":"DATASET_DIR"}
  - name: pvc-path
    persistentVolumeClaim:
      claimName: workdisk # {"$openapi":"PVC_NAME"}
  restartPolicy: OnFailure
