Git Product home page Git Product logo

nvidia-cuda-exporter's Introduction

NVIDIA-CUDA-EXPORTER

Capture d’écran du 2024-03-13 00-32-20

Github Page Link

Overview

This README provides comprehensive information about the project, including its purpose, usage instructions, and configuration details.

Dockerized Python Application with NVIDIA CUDA Support

Dockerfile

The Dockerfile sets up a Docker image for running a Python application that utilizes NVIDIA CUDA for GPU computation. It includes the following steps:

  • Starts from the NVIDIA CUDA image with Python support (nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu20.04).
  • Installs Python, pip, and virtualenv.
  • Creates a virtual environment and activates it.
  • Upgrades pip in the virtual environment.
  • Copies the requirements.txt file into the container and installs dependencies.
  • Makes sure the appuser owns the application directory.
  • Copies the gpu_metrics.py script into the container.
  • Exposes port 8888.
  • Specifies the command to run the script (CMD ["python3", "gpu_metrics.py"]).

Usage

To use the Docker image:

  1. Clone or download the repository containing the Dockerfile and other necessary files.
  2. Build the Docker image:
docker build -t nvidia-cuda-exporter .
  1. Run a Docker container based on the image:
docker run --name nvidia-cuda-exporter --gpus all -p 8888:8888 -v /usr/local/nvidia:/usr/local/nvidia nvidia-cuda-exporter
  1. Access the Python application through a web browser or programmatically: http://localhost:<host-port>

Replace <host-port> with the desired port on your host machine.

NVIDIA GPU Metrics Collector

Python Script

The gpu_metrics_collector.py script collects GPU metrics using NVIDIA Management Library (NVML) and exposes them as Prometheus metrics via an HTTP server. It includes the following functionality:

  • Collects various GPU metrics such as memory usage, utilization, temperature, power usage, fan speed, clock speeds, PCIe transmission speed, and more.
  • Exposes the metrics at http://localhost:8888/metrics.

Usage

To use the script:

  1. Clone or download the repository containing the script.
  2. Install the required dependencies: pip install prometheus_client pynvml
  3. Run the script: python gpu_metrics_collector.py

Access the metrics at http://localhost:8888/metrics.

nvidia-cuda-exporter's People

Contributors

h4ckm1n-dev avatar renovate[bot] avatar

Watchers

 avatar

nvidia-cuda-exporter's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
  • nvidia/cuda 12.3.2-cudnn9-runtime-ubuntu20.04
pip_requirements
requirements.txt
  • prometheus_client ==0.20.0
  • PyNVML ==11.5.0
  • nvidia-ml-py3 ==7.352.0

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: packageRules[0]: packageRules cannot combine both matchUpdateTypes and rangeStrategy. Rule: {"matchDatasources":["docker"],"matchUpdateTypes":["major","minor","patch"],"matchManagers":["dockerfile"],"rangeStrategy":"pin","groupName":"docker dependencies"}, packageRules[1]: packageRules cannot combine both matchUpdateTypes and rangeStrategy. Rule: {"matchDatasources":["pypi"],"matchUpdateTypes":["major","minor","patch"],"matchManagers":["pip_requirements"],"rangeStrategy":"pin","groupName":"python dependencies"}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.