https://github.com/chaunceyjiang/fake-gpu
This project is designed to simulate GPU information, making it easier to test scenarios where a GPU is not available.
https://github.com/chaunceyjiang/fake-gpu
fake gpu kubernetes simulation
Last synced: 10 months ago
JSON representation
This project is designed to simulate GPU information, making it easier to test scenarios where a GPU is not available.
- Host: GitHub
- URL: https://github.com/chaunceyjiang/fake-gpu
- Owner: chaunceyjiang
- License: apache-2.0
- Created: 2025-01-10T12:11:02.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-04T11:37:33.000Z (11 months ago)
- Last Synced: 2025-03-04T12:32:00.018Z (11 months ago)
- Topics: fake, gpu, kubernetes, simulation
- Language: C++
- Homepage:
- Size: 4.4 MB
- Stars: 20
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fake-gpu
## Project Overview
The `fake-gpu` project is designed to simulate GPU information, making it easier to test scenarios where a GPU is not available. This can be particularly useful for development and testing purposes in environments that lack physical GPU hardware.
## Features
- Simulate GPU information through configuration files
- Unable to Perform Genuine CUDA Computation
- Test GPU-related functions without GPU hardware
- Non-intrusive, no need to modify application code
- Supports CUDA Driver, CUDA Runtime, NVML API
- Supports nvidia-smi
- Supports DCGM-Exporter
## Requirements
- containerd >= 1.7.0
## Usage
To use the fake GPU, follow these steps:
You should have a Kubernetes cluster running with containerd as the container runtime.
You should have already deployed [nvidia-device-plugin](https://github.com/NVIDIA/k8s-device-plugin) or [HAMi](https://github.com/Project-HAMi/HAMi).
### Option 1: Deploy the [nvidia-device-plugin](https://github.com/NVIDIA/k8s-device-plugin)
``` shell
kubectl create -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/v0.17.0/deployments/static/nvidia-device-plugin.yml
```
### Option 2: Deploy the [HAMi](https://github.com/Project-HAMi/HAMi)
``` shell
helm repo add hami-charts https://project-hami.github.io/HAMi/
helm install hami hami-charts/hami -n kube-system
```
### Deploy the fake GPU
1. Download the latest release of the fake GPU.
``` shell
helm repo add fake-gpu-charts https://chaunceyjiang.github.io/fake-gpu
helm repo update
```
2. Deploy the fake GPU to your Kubernetes cluster.
``` shell
helm install fake-gpu fake-gpu-charts/fake-gpu -n kube-system
```
3. Configure your application to use the GPU.
``` shell
cat < install.yaml
kubectl apply -f install.yaml
```
## Contributing
We welcome contributions to the `fake-gpu` project. To contribute, follow these guidelines:
1. Fork the repository.
2. Create a new branch for your feature or bugfix.
3. Make your changes and commit them with descriptive commit messages.
4. Push your changes to your forked repository.
5. Create a pull request to the main repository.
Please ensure your code follows the project's coding standards and includes appropriate tests.