mlco2 / codecarbon

Track emissions from Compute and recommend ways to reduce their impact on the environment.
https://mlco2.github.io/codecarbon
MIT License
1.18k stars 178 forks source link

Execution fails because of insufficient permissions #444

Open fatma-laribi opened 1 year ago

fatma-laribi commented 1 year ago

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.

benoit-cty commented 1 year ago

Thanks, you're right, CodeCarbon should be able to run without monitoring GPU.

Do you know how can we reproduce this ?