$ mkdir -p $GOPATH/src/github.com/intel/
$ cd $GOPATH/src/github.com/intel/
$ git clone https://github.com/intel/intel-device-plugins-for-kubernetes.git
$ ls /var/lib/kubelet/device-plugins/kubelet.sock
/var/lib/kubelet/device-plugins/kubelet.sock
$ cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
$ make gpu_plugin
$ sudo $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes/cmd/gpu_plugin/gpu_plugin
device-plugin start server at: /var/lib/kubelet/device-plugins/gpu.intel.com-i915.sock
device-plugin registered
$ make intel-gpu-plugin
$ kubectl create -f ./deployments/gpu_plugin/gpu_plugin.yaml
daemonset.apps/intel-gpu-plugin created
$ kubectl describe node <node name> | grep gpu.intel.com
gpu.intel.com/i915: 1
gpu.intel.com/i915: 1
-
Build a Docker image with an example program offloading FFT computations to GPU:
$ cd demo $ ./build-image.sh ubuntu-demo-opencl
This command produces a Docker image named
ubuntu-demo-opencl
. -
Create a pod running unit tests off the local Docker image:
$ kubectl apply -f demo/intelgpu-job.yaml
-
Review the pod's logs:
$ kubectl logs intelgpu-demo-job-xxxx