Skip to content

Commit

Permalink
Add nvidia-smi function
Browse files Browse the repository at this point in the history
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
welteki authored and alexellis committed Jan 22, 2025
1 parent dab6684 commit 4ec071c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
13 changes: 13 additions & 0 deletions nvidia-smi/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ghcr.io/openfaas/classic-watchdog:0.3.2 AS watchdog

FROM ubuntu:24.04

COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog

USER 1000

ENV fprocess="nvidia-smi"

HEALTHCHECK --interval=3s CMD [ -e /tmp/.lock ] || exit 1
CMD ["fwatchdog"]
7 changes: 5 additions & 2 deletions stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,14 @@ functions:
lang: golang-middleware
handler: ./markdown
image: ${SERVER:-ghcr.io}/${OWNER:-openfaas}/markdown-fn:${TAG:-latest}

nvidia-smi:
lang: dockerfile
handler: ./nvidia-smi
image: ${SERVER:-ghcr.io}/${OWNER:-openfaas}/nvidia-smi:${TAG:-latest}


configuration:
templates:
- name: golang-middleware
source: https://github.com/openfaas/golang-http-template


0 comments on commit 4ec071c

Please sign in to comment.