Yoda is a kubernetes scheduler based on scheduling-framework. By cooperation with SCV Sniffer, it is schedules tasks according to GPU metrics.
-
Make sure kubernetes cluster version is
1.17+
and SCV sniffer is deployed in kubernetes cluster: SCV: Get-Started -
Deploy Yoda Scheduler:
kubectl apply -f https://raw.githubusercontent.com/NJUPT-ISL/Yoda-Scheduler/master/deploy/yoda-scheduler.yaml
- Check the Yoda Scheduler Status:
kubectl get pods -n kube-system
- Create a pod which needs 1000MB GPU Memory:
apiVersion: v1
kind: Pod
metadata:
name: test
labels:
scv/FreeMemory: "1000"
spec:
schedulerName: yoda-scheduler
containers:
- image: nginx
name: nginx
- Create a pod which needs 2 GPU:
apiVersion: v1
kind: Pod
metadata:
name: test2
labels:
scv/Number: "2"
spec:
schedulerName: yoda-scheduler
containers:
- image: nginx
name: nginx
- Create a pod that requires a high-performance GPU:
apiVersion: v1
kind: Pod
metadata:
name: test3
labels:
scv/Level: "High"
spec:
schedulerName: yoda-scheduler
containers:
- image: nginx
name: nginx
kubectl get pods
- Compile yoda-scheduler:
make local
- Build the docker image:
make build
- Clean the Build file
make clean