Post

Nvidia GPU Monitor

GPU Monitor: Your NVIDIA GPU’s Best Friend 🎮

Ever wondered what your GPU is up to? Whether you’re training ML models, rendering videos, or gaming hard, keeping an eye on your GPU’s health is crucial. Enter GPU Monitor - a sleek, real-time dashboard that turns boring metrics into beautiful visualizations.

Who Needs This?

  • ML Engineers training models for days (Is that GPU throttling?)
  • Content Creators rendering their masterpieces (Why is this export taking so long?)
  • Gamers pushing their hardware to the limit (Is it time to dial back those settings?)

Why You’ll Love It

  • Real-time Metrics: Temperature, utilization, memory usage, and power consumption at a glance
  • Historical Data: See how your GPU performs over time (15min to 24hr views)
  • Smart Alerts: Get notified when your GPU needs attention
  • Clean Interface: Modern, dark theme dashboard that’s easy on the eyes
  • Lightweight: Uses minimal resources while monitoring
  • Docker-based: Run it anywhere, no messy installations

Quick Setup

  1. Got Docker? You’re halfway there! Just run:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    
    docker run -d \
      --name gpu-monitor \
      -p 8081:8081 \
      -e TZ=America/Los_Angeles \
      -v /etc/localtime:/etc/localtime:ro \
      -v ./history:/app/history \
      -v ./logs:/app/logs \
      --gpus all \
      --restart unless-stopped \
      bigsk1/gpu-monitor:latest
    
  2. Open http://localhost:8081 in your browser

  3. Watch your GPU metrics come alive!

Cool Features You Might Not Expect

  • Clickable Gauges: Toggle different metrics on the performance graph
  • Intelligent Alerts: Set custom thresholds for temperature, utilization, and power
  • Sound Notifications: Hear when your GPU needs attention (customizable)
  • Browser Notifications: Stay informed even when the tab isn’t active
  • Data Persistence: Track performance across restarts
  • Mobile Responsive: Check your GPU from your phone

Real-world Uses

For ML Engineers

Track GPU utilization during training runs. Is your model actually using the GPU efficiently? Are you thermal throttling? GPU Monitor helps you optimize your training pipelines.

For Content Creators

Monitor rendering jobs without constantly checking task manager. Get notified when renders complete or if your GPU is struggling.

For Gamers

Keep an eye on temperatures during intense gaming sessions. Perfect for overclocking experiments or optimizing game settings.

Pro Tips

  • Set custom alert thresholds based on your GPU’s specs
  • Use browser notifications for headless setups
  • Check historical data to identify performance patterns
  • Monitor power efficiency for optimal workloads

Join the Community

Found a bug? Have a feature request? Want to contribute? Check out our GitHub repository!


Remember: A watched GPU never throttles! 🚀

Github Readme

Docker support Docker Pulls Docker Image Size

Nvidia GPU Dashboard

A real-time lightweight NVIDIA GPU monitoring dashboard built with Docker for easy deployment and cross-platform compatibility.

Features

  • Real-time GPU metrics monitoring
  • Interactive web dashboard
  • Historical data tracking (15m, 30m, 1h, 6h, 12h, 24h)
  • Temperature, utilization, memory, and power monitoring
  • Docker-based for easy deployment
  • Persist history between new containers
  • Real time alerts - sound and notification
  • Responsive theme for any size screen
  • Toggle gauges on or off to show metrics in graph

Prerequisites

  • Docker
  • NVIDIA GPU
  • NVIDIA Container Toolkit

Quick Start

Test to see if you already have the requirements and ready to use.

1
sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi

If this failed proceed to Installation Prerequisites

Using Pre-built Image

1
2
3
4
5
6
7
8
9
10
docker run -d \
  --name gpu-monitor \
  -p 8081:8081 \
  -e TZ=America/Los_Angeles \
  -v /etc/localtime:/etc/localtime:ro \
  -v ./history:/app/history \
  -v ./logs:/app/logs \
  --gpus all \
  --restart unless-stopped \
  bigsk1/gpu-monitor:latest

Note: Update your timezone to use the correct time

Using Docker Compose

  1. Clone the repository:
    1
    2
    
    git clone https://github.com/bigsk1/gpu-monitor.git
    cd gpu-monitor
    
  2. Start the container:
    1
    
    docker-compose up -d
    
  3. Access the dashboard at: http://localhost:8081

Installation Prerequisites

1. Ubuntu / Debian / WSL

Windows users make sure you have wsl with docker an easy way is Docker Desktop Installation for Windows

Installing with apt add NVIDIA package repositories

1
2
3
4
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
  && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

2. Install nvidia container toolkit

1
sudo apt-get update
1
sudo apt-get install -y nvidia-container-toolkit

3. Configure Docker with toolkit

1
sudo nvidia-ctk runtime configure --runtime=docker

The nvidia-ctk command modifies the /etc/docker/daemon.json file on the host. The file is updated so that Docker can use the NVIDIA Container Runtime.

4. Restart Docker daemon

1
sudo systemctl restart docker

5. Test to see if installed correctly

1
sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi

For other distributions, check the official documentation.

Building gpu-monitor from source

  1. Clone the repository:
    1
    2
    
    git clone https://github.com/bigsk1/gpu-monitor.git
    cd gpu-monitor
    
  2. Build the image:
    1
    
    docker build -t gpu-monitor .
    
  3. Run the container:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    
    docker run -d \
      --name gpu-monitor \
      -p 8081:8081 \
      -e TZ=America/Los_Angeles \
      -v /etc/localtime:/etc/localtime:ro \
      -v ./history:/app/history \
      -v ./logs:/app/logs \
      --gpus all \
      --restart unless-stopped \
      gpu-monitor
    

Configuration

The dashboard is accessible at: http://localhost:8081 by default. To change the port, modify the docker-compose.yml file or the -p parameter in the docker run command.


GPU Monitor Dashboard

Alternative Setup Method

A setup script is provided for convenience. It checks prerequisites and manages the service:

  • If you have issues then make sure setup.sh is executable
1
chmod +x ./setup.sh

  • Check prerequisites and start the service
    1
    
    ./setup.sh start
    

  • Stop the service
    1
    
    ./setup.sh stop
    

  • Restart the service
    1
    
    ./setup.sh restart
    

  • Check service status
    1
    
    ./setup.sh status
    

  • View logs
    1
    
    ./setup.sh logs
    

Example of script running

1
2
3
4
5
6
7
8
9
10
11
12
~/gpu-monitor ./setup.sh start
[+] Checking prerequisites...
[+] Docker: Found
[+] Docker Compose: Found
[+] NVIDIA Docker Runtime: Found
[+] NVIDIA GPU: Found
[+] Starting GPU Monitor...
Creating network "gpu-monitor_default" with the default driver
Creating gpu-monitor ... done
[+] GPU Monitor started successfully!
[+] Dashboard available at: http://localhost:8081
[+] To check logs: docker-compose logs -f

Data Persistence

By default, all data is stored within the container will persist between container rebuilds, if you don’t want that then remove volumes, modify the docker run or docker-compose.yml:

1
2
3
4
5
6
services:
  gpu-monitor:
    # ... other settings ...
    volumes:
      - ./history:/app/history    # Remove Persist historical data
      - ./logs:/app/logs    # Remove Persist logs

Alerts

You can enable or disable alerts in ui, you can set thresholds for gpu temp, gpu utilization % and watts. Setting are saved in your browser if you make changes you only need to do it once, however you can always modify the code and rebuild the container to make it permanent.

The defaults are:

1
2
3
    temperature: 80,  
    utilization: 100,
    power: 300

GPU Monitor Dashboard

Troubleshooting

Common Issues

  1. NVIDIA SMI not found
    • Ensure NVIDIA drivers are installed
    • Verify NVIDIA Container Toolkit installation
    • Make sure you can run:
1
sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi

If this failed proceed to Installation Prerequisites

  1. Container fails to start
    • Check Docker logs: docker logs gpu-monitor
    • Verify GPU access: nvidia-smi
    • Ensure proper permissions
  2. Dashboard not accessible
    • Verify container is running: docker ps
    • Check container logs: docker logs gpu-monitor
    • Ensure port 8081 is not in use
  3. TimeStamps don’t match your local time

  4. I don’t like the alert sound
    • Replace the .mp3 in the sounds folder and name it alert.mp3
    • Getting double sounds from notifications, disable windows notifications or disable it in ui.

Mobile Layout

GPU Monitor Dashboard Mobile Temp

GPU Monitor Dashboard Mobile Stats

License

License

Docker Scout Score

Docker Scout

This post is licensed under CC BY 4.0 by the author.