-
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 Dockerfile and Kubernetes DaemonSet deployment
- Loading branch information
Showing
4 changed files
with
67 additions
and
2 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,9 @@ | ||
FROM acceleratorbase/openvino-base | ||
|
||
ADD . /app/ | ||
WORKDIR /app | ||
RUN python3 setup.py install | ||
|
||
EXPOSE 8084 | ||
|
||
CMD [ "prometheus_ncs2_exporter" ] |
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
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,35 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: ncs2-exporter | ||
namespace: kube-system | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: ncs2-exporter | ||
template: | ||
metadata: | ||
labels: | ||
name: ncs2-exporter | ||
annotations: | ||
prometheus.io/scrape: "true" | ||
spec: | ||
containers: | ||
- name: ncs2-exporter | ||
image: adaptant/prometheus-ncs2-exporter:latest | ||
ports: | ||
- containerPort: 8084 | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
# k8s-auto-labeller | ||
- key: accelerators/ncs2 | ||
operator: Exists | ||
- matchExpressions: | ||
# USB-attached NCS2 (using NFD discovery) | ||
- key: feature.node.kubernetes.io/usb-ff_03e7_2485.present | ||
operator: In | ||
values: | ||
- "true" |
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