Execution fails because of insufficient permissions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 323
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 12
Description
Hello,
The codecarbon execution fails because of insufficient permissions to access the GPU NVML interface, is there any way I can resolve this or disable GPU tracking? (I can not get permissions)
Thanks in advance!
A part of the error logs:
File "/usr/local/lib/python3.9/dist-packages/codecarbon/emissions_tracker.py", line 284, in init
gpu_devices = GPU.from_utils(self._gpu_ids)
File "/usr/local/lib/python3.9/dist-packages/codecarbon/external/hardware.py", line 121, in from_utils
return cls(gpu_ids=gpu_ids)
File "", line 4, in init
File "/usr/local/lib/python3.9/dist-packages/codecarbon/external/hardware.py", line 63, in post_init
self.devices = AllGPUDevices()
File "/usr/local/lib/python3.9/dist-packages/codecarbon/core/gpu.py", line 208, in init
gpu_device = GPUDevice(handle=handle, gpu_index=i)
File "", line 8, in init
File "/usr/local/lib/python3.9/dist-packages/codecarbon/core/gpu.py", line 47, in post_init
self._init_static_details()
File "/usr/local/lib/python3.9/dist-packages/codecarbon/core/gpu.py", line 83, in _init_static_details
memory = self._get_memory_info()
File "/usr/local/lib/python3.9/dist-packages/codecarbon/core/gpu.py", line 137, in _get_memory_info
return pynvml.nvmlDeviceGetMemoryInfo(self.handle)
File "/usr/local/lib/python3.9/dist-packages/pynvml/nvml.py", line 2440, in nvmlDeviceGetMemoryInfo
_nvmlCheckReturn(ret)
File "/usr/local/lib/python3.9/dist-packages/pynvml/nvml.py", line 833, in _nvmlCheckReturn
raise NVMLError(ret)
Message:
Insufficient Permissions
User error.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading codecarbon/emissions_tracker.py, external/hardware.py, and core/gpu.py around GPU initialization and the pynvml memory call shown in the traceback. Reproduce the insufficient-permissions path and determine whether the existing tracker exposes a documented way to disable GPU tracking. Done should be a confirmed resolution or a clearly specified handling path for this environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100