Skip to main content

Intel NCS2 device plugin for Kubernetes

Project description

Intel NCS2 device plugin for Kubernetes

PyPI PyPI Docker Pulls

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ncs2_device_plugin-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ncs2_device_plugin-0.1.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file ncs2_device_plugin-0.1.0.tar.gz.

File metadata

  • Download URL: ncs2_device_plugin-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for ncs2_device_plugin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6e2a96bab884b90e6de639bcde224463e8c14476f4c1f424ab6d94949a815c60
MD5 41dfaef84fe779883dc1678befe477f7
BLAKE2b-256 f91b37a777a4ecfb6ad9f145a84e1e2160edda2d76f3e7359fdf1e356949f53c

See more details on using hashes here.

File details

Details for the file ncs2_device_plugin-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ncs2_device_plugin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for ncs2_device_plugin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38cc23ad0bd58989d6e71cfb883baa6a503addf8e1fd6170bff288fcbe82a95e
MD5 b81d8061036c5cfcb1fefb2dc08d6700
BLAKE2b-256 d55c2936d81215873084e4bcf53e109c129371ea507039d6307c4c55c461508e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page