Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nvidia-smi function to store #161

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Conversation

welteki
Copy link
Member

@welteki welteki commented Jan 22, 2025

Description

Add nvidia-smi function.
Invoking the function returns the NVIDIA System Management Interface (nvidia-smi) info.

Requires openfaas/store-functions#12

How has this been tested

Ran the function locally using docker with the nvidia container runtime.

 docker run --rm -it -p 8080:8080 \
  --runtime=nvidia \
  --gpus all \
  ghcr.io/openfaas/nvidia-smi:latest
curl -i 127.0.0.1:8080
HTTP/1.1 200 OK
X-Duration-Seconds: 0.044398
Date: Wed, 22 Jan 2025 15:44:22 GMT
Content-Length: 1778
Content-Type: text/plain; charset=utf-8

Wed Jan 22 15:44:22 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.57.01              Driver Version: 565.57.01      CUDA Version: 12.7     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GT 1030         On  |   00000000:01:00.0 Off |                  N/A |
| 35%   26C    P8             N/A /   19W |       2MiB /   2048MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |

functions.json Outdated Show resolved Hide resolved
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
@alexellis alexellis merged commit cb81a96 into openfaas:master Jan 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants