Skip to content

Instantly share code, notes, and snippets.

@msaroufim
Last active February 2, 2026 13:59
Show Gist options
  • Select an option

  • Save msaroufim/9e56ce5d42a5e9ccd5e938c83181ea47 to your computer and use it in GitHub Desktop.

Select an option

Save msaroufim/9e56ce5d42a5e9ccd5e938c83181ea47 to your computer and use it in GitHub Desktop.

Enable NVIDIA Nsight Compute Profiling for Your Customers

The Problem

Your GPU customers can't profile their CUDA/PyTorch workloads because NCU profiling is disabled by default:

$ ncu python script.py
==ERROR== ERR_NVGPUCTRPERM: Permission denied

The Fix

Run this once on each GPU host:

echo "options nvidia NVreg_RestrictProfilingToAdminUsers=0" | sudo tee /etc/modprobe.d/nvprof.conf
sudo reboot

That's it. All containers on that host can now use NCU.

Docker probably needs one more flag to be added

Reference

Official NVIDIA guidance: NVIDIA Developer Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment