-
Kubernetes >= 1.11, kubectl >= 1.12
-
You'd better to choose Alibaba Cloud Kubernetes Service. The solution is only for the dedicated Kubernetes Cluster.
1.Just run:
git clone https://github.com/AliyunContainerService/gpushare-scheduler-extender.git
cd gpushare-scheduler-extender/deployer/chart
helm install --name gpushare --namespace kube-system --set masterCount=3 gpushare-installer
2.Add gpushare node labels to the nodes requiring GPU sharing
kubectl label node <target_node> gpushare=true
For example:
kubectl label no mynode gpushare=true
3.Install Kubectl extension
4.Install kubectl 1.12 or above
You can download and install kubectl
for linux
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.12.1/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/bin/kubectl
5.Download and install the kubectl extension
cd /usr/bin/
wget https://github.com/AliyunContainerService/gpushare-device-plugin/releases/download/v0.3.0/kubectl-inspect-gpushare
chmod u+x /usr/bin/kubectl-inspect-gpushare
6.Disable the gpushare node
kubectl label node <target_node> gpushare=false
For example:
kubectl label no mynode gpushare=false