Intel NCS2 device plugin for Kubernetes
A Kubernetes device plugin for the Intel Neural Compute Stick 2 (NCS2) / Intel Movidius MyriadX
Quick Start
To directly install ncs2-device-plugin as a DaemonSet into the Kubernetes cluster:
$ kubectl apply -f https://raw.githubusercontent.com/adaptant-labs/ncs2-device-plugin/ncs2-device-plugin.yaml
Pods will be scheduled on any node with a feature.node.kubernetes.io/usb-ff_03e7_2485.present (provided by NFD) or
accelerators/ncs2 (provided by k8s-auto-labeller, in combination with NFD-based discovery) label set. These labels
can also be set manually on NCS2-capable nodes for simple deployments in order to enqueue the Pod.
Annotations
Annotations are produced for the per-device full device name, allowing for different device types to be explicitly targeted, regardless of their insertion order into the system:
# For a single device
ncs2.intel.com/MYRIAD.name: Intel Movidius Myriad X VPU
# For multiple devices
ncs2.intel.com/MYRIAD.0.name: Intel Movidius Myriad X VPU
...
Node Labels
Node labels are produced for the number of devices and per-device optimization capabilities:
intel.com/ncs2=<number of NCS2 devices>
# For a single device
ncs2.intel.com/MYRIAD.FP16=true
# For multiple devices
ncs2.intel.com/MYRIAD.0.FP16=true
...
USB Hotplug Event Reconciliation
Node labels and annotations are reconciled on the node each time a USB device is added or removed from the system. This can be seen below:
2020-11-16 00:16:52 INFO Discovered 1 NCS2 device(s):
2020-11-16 00:16:52 INFO MYRIAD: Intel Movidius Myriad X VPU, Optimizations: ['FP16']
2020-11-16 00:16:52 INFO Applying initial labels and annotations to current node...
2020-11-16 00:16:52 INFO Reconciling node sgx-celsius-w550power
2020-11-16 00:16:52 INFO Starting USB monitor...
2020-11-16 00:17:04 INFO Received a USB remove event for Device('/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4')
2020-11-16 00:17:04 INFO Reconciling node sgx-celsius-w550power
2020-11-16 00:17:26 INFO Received a USB add event for Device('/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4')
2020-11-16 00:17:26 INFO Reconciling node sgx-celsius-w550power
Features and bugs
Please file feature requests and bugs in the issue tracker.
Acknowledgements
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 825480 (SODALITE).
License
ncs2-device-plugin is licensed under the terms of the Apache 2.0 license, the full
version of which can be found in the LICENSE file included in the distribution.
Metadata
Release files for ncs2-device-plugin 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ncs2_device_plugin-0.1.0.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ncs2_device_plugin-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.9 kB
Release files / ncs2_device_plugin-0.1.0.tar.gz
| Download URL | ncs2_device_plugin-0.1.0.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e2a96bab884b90e6de639bcde224463e8c14476f4c1f424ab6d94949a815c60
|
|
BLAKE2b-256 checksum How to use checksums |
f91b37a777a4ecfb6ad9f145a84e1e2160edda2d76f3e7359fdf1e356949f53c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6
|
Release files / ncs2_device_plugin-0.1.0-py3-none-any.whl
| Download URL | ncs2_device_plugin-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
38cc23ad0bd58989d6e71cfb883baa6a503addf8e1fd6170bff288fcbe82a95e
|
|
BLAKE2b-256 checksum How to use checksums |
d55c2936d81215873084e4bcf53e109c129371ea507039d6307c4c55c461508e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6
|