---
apiVersion: v1
kind: Pod
metadata:
  name: elasticdl-test-mnist-master
  labels:
    app: elasticdl
    elasticdl-job-name: test-mnist
    elasticdl-replica-type: master
    elasticdl-replica-index: "0"
spec:
  containers:
    - name: mnist-demo-container
      image: elasticdl:ci
      command: ["/bin/bash"]
      args:
        - -c
        - >
          python -m elasticdl.python.master.main
          --model_zoo=model_zoo
          --model_def=mnist.mnist_functional_api.custom_model
          --training_data=/data/mnist/train
          --validation_data=/data/mnist/test
          --num_epochs=2
          --grads_to_wait=10
          --minibatch_size=64
          --num_minibatches_per_task=2
          --num_workers=2
          --checkpoint_steps=10
          --evaluation_steps=15
          --worker_image=elasticdl:ci
          --job_name=test-mnist
          --log_level=INFO
          --image_pull_policy=IfNotPresent
      imagePullPolicy: IfNotPresent
      env:
        - name: MY_POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
  restartPolicy: Never
