apiVersion: apps/v1
kind: Deployment
metadata:
  name: tensorflow-training
  labels:
    app: tensorflow-training
spec:
  replicas: 10
  selector:
    matchLabels:
      app: tensorflow-training
  template:
    metadata:
      name: tensorflow-training
      labels:
        app: tensorflow-training
    spec:
      nodeSelector:
        nvidia.com/gpu: "true"
      tolerations:
      - key: "nvidia.com/gpu"
        operator: "Exists"
        effect: "NoSchedule"
      containers:
      - name: tensorflow-training
        image: 763104351884.dkr.ecr.us-west-2.amazonaws.com/tensorflow-training:1.13-horovod-gpu-py36-cu100-ubuntu16.04
        command: ["/bin/sh","-c"]
        args: ["git clone https://github.com/fchollet/keras.git && python /keras/examples/mnist_cnn.py"]
        resources:
          limits:
            nvidia.com/gpu: 1