-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CoralTPU definition for generic-device-plugin (#152)
- Loading branch information
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# CoralTPU device definition for generic-device-plugin | ||
|
||
This will add a definition for the [Coral TPU USB Accelerator](https://coral.ai/products/accelerator) to your [Generic Device Plugin](https://github.com/sdwilsh/ansible-playbooks/kustomization/components/generic-device-plugin). | ||
|
||
# Example Usage | ||
|
||
```yaml | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
components: | ||
- https://github.com/sdwilsh/ansible-playbooks/kustomization/components/generic-device-plugin | ||
- https://github.com/marinatedconcrete/config/kustomization/components/gdp-coraltpu | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
- op: add | ||
path: /spec/template/spec/containers/0/args/- | ||
value: --device | ||
- op: add | ||
path: /spec/template/spec/containers/0/args/- | ||
# Note that the vendor and product start out as 1a64:089a until the first inference when they | ||
# switch to 18d1:9302. See | ||
# https://github.com/google-coral/edgetpu/issues/536#issuecomment-1033056048 as source of truth. | ||
value: | | ||
name: coraltpu | ||
groups: | ||
- usb: | ||
- product: 089a | ||
vendor: 1a6e | ||
- usb: | ||
- product: 9302 | ||
vendor: 18d1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
kind: Component | ||
|
||
patches: | ||
- path: add-coraltpu.yml | ||
target: | ||
kind: DaemonSet | ||
name: generic-device-plugin |