tf_pserver.yaml 1.4 KB
Newer Older
G
gongweibao 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
apiVersion: extensions/v1beta1
kind: ReplicaSet
metadata:
  name: vgg16job-tf-pserver
spec:
  replicas: 10
  template:
    metadata:
      labels:
        tf-job-pserver: vgg16job-tf
    spec:
      hostNetwork: true
      imagePullSecrets:
      - name: job-registry-secret
      containers:
      - name: pserver
        image: "registry.baidu.com/paddlepaddle/fluid_benchmark_tf:vgg16"
        imagePullPolicy: Always
        command: ["tf_k8s", "start_tf"]
        ports:
        - name: jobport-30236
          containerPort: 30236
        env:
        - name: PORT
          value: "32036"
        - name: ENTRY
          value: "python vgg16_tf.py"
        - name: JOB_NAME
          value: vgg16job-tf
        - name: PSERVERS_NUM
          value: "10"
        - name: TF_JOB_NAME 
          value: "ps"
        - name: TRAINERS_NUM
          value: "20"
        - name: BATCH_SIZE
          value: "128"
        - name: TRAINER_PACKAGE
          value: "/workspace"
        - name: NUM_PASSES
          value: "1"
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: "metadata.namespace"
        - name: POD_IP
          valueFrom:
            fieldRef:
              fieldPath: "status.podIP"
        resources:
          requests:
            memory: 10Gi
            cpu: 4
          limits:
            memory: 10Gi
            cpu: 4