From 11b049755c9fda2aab8303ce9cb772cceba8b62e Mon Sep 17 00:00:00 2001 From: Yuqi Wang Date: Thu, 26 Mar 2020 21:18:17 +0800 Subject: [PATCH] Update HiveD TF example --- ...flowdistributedtrainingwithhivedscheduledgpu.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/example/framework/scenario/tensorflow/gpu/tensorflowdistributedtrainingwithhivedscheduledgpu.yaml b/example/framework/scenario/tensorflow/gpu/tensorflowdistributedtrainingwithhivedscheduledgpu.yaml index c206e09a..b4dfeb37 100644 --- a/example/framework/scenario/tensorflow/gpu/tensorflowdistributedtrainingwithhivedscheduledgpu.yaml +++ b/example/framework/scenario/tensorflow/gpu/tensorflowdistributedtrainingwithhivedscheduledgpu.yaml @@ -47,6 +47,7 @@ spec: # 3 workers are specified with the same containerPort. # See https://kubernetes.io/docs/concepts/cluster-administration/networking hostNetwork: false + priorityClassName: prod-priority containers: - name: tensorflow # Using official image to demonstrate this example. @@ -159,6 +160,7 @@ spec: # [PREREQUISITE] # Same as ps TaskRole. hostNetwork: false + priorityClassName: prod-priority containers: - name: tensorflow image: frameworkcontroller/tensorflow-examples:gpu @@ -215,3 +217,13 @@ spec: #nfs: # server: {NFS Server Host} # path: {NFS Shared Directory} +--- +# Post to {kubeApiServerAddress}/apis/scheduling.k8s.io/v1/priorityclasses/ +# PodPriority should be set proportional to above AffinityGroupPriority, +# i.e. the hivedscheduler.microsoft.com/pod-scheduling-spec.priority, +# otherwise, K8S may be incompatible with hived. +apiVersion: scheduling.k8s.io/v1 +kind: PriorityClass +metadata: + name: prod-priority +value: 1000