Skip to content

Commit 44fc21b

Browse files
committed
Add nvidia-smi function
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
1 parent dab6684 commit 44fc21b

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

nvidia-smi/Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM ghcr.io/openfaas/classic-watchdog:0.3.2 AS watchdog
2+
3+
FROM ubuntu:24.04
4+
5+
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
6+
RUN chmod +x /usr/bin/fwatchdog
7+
8+
USER 1000
9+
10+
ENV fprocess="nvidia-smi"
11+
12+
HEALTHCHECK --interval=3s CMD [ -e /tmp/.lock ] || exit 1
13+
CMD ["fwatchdog"]

stack.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,14 @@ functions:
100100
lang: golang-middleware
101101
handler: ./markdown
102102
image: ${SERVER:-ghcr.io}/${OWNER:-openfaas}/markdown-fn:${TAG:-latest}
103+
104+
nvidia-smi:
105+
lang: dockerfile
106+
handler: ./nvidia-smi
107+
image: ${SERVER:-ghcr.io}/${OWNER:-openfaas}/nvidia-smi:${TAG:-latest}
103108

104109

105110
configuration:
106111
templates:
107112
- name: golang-middleware
108113
source: https://github.com/openfaas/golang-http-template
109-
110-

0 commit comments

Comments
 (0)