Open IArchi opened 2 years ago
can you try to follow this and see if it works..
apiVersion: v1
kind: Pod
metadata:
name: http-echo-edgetpu-pod
labels:
app: http-echo
spec:
containers:
- name: http-echo
image: adaptant/http-echo
imagePullPolicy: IfNotPresent
args: [ "-text", "hello from a node with an EdgeTPU" ]
ports:
- containerPort: 5678
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
# USB-attached Coral AI Accelerator
- key: feature.node.kubernetes.io/usb-fe_1a6e_089a.present
operator: In
values: [ "true" ]
- matchExpressions:
# Coral Dev Board
- key: beta.devicetree.org/fsl-imx8mq-phanbell
operator: In
values: [ "1" ]
dt-labeller
seems to only be suitable for arm64. My server's architecture is amd64.
nodeSelector:
kubernetes.io/arch: arm64
Running the DaemonSet or the NFD (even without the nodeSelector
) failed:
panic: no valid device tree configuration found
goroutine 1 [running]:
main.main()
/app/main.go:179 +0xd85
I've tried to deploy a very basic pod on my Kubernetes cluster.
from pycoral.utils.edgetpu import list_edge_tpus
print(list_edge_tpus(), flush=True)
Running directly into a Docker container produces the following results:
[{'type': 'usb', 'path': '/sys/bus/usb/devices/4-1'}]
While running in the Kubernetes pods produces:
[]
This seems Kubernetes has not mounted the USB dongle.
Given the
docker
command is (and works perfectly):The
kubernetes
yaml file should looks like this:But this does not work. The Coral Edge TPU (USB Dongle) is not detected by the pod.
Is there any parameter to add to make it works ?
Thanks