Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError: [Errno 2] No such file or directory: 'nvidia-smi' #290

Open
shamealoneil opened this issue Jun 10, 2024 · 1 comment
Open

Comments

@shamealoneil
Copy link

Hello,

I was trying to setup local run on my mac and got this error when running: "torchserve --start --ts-config config.local.properties --foreground" And got a no module named "nvgpu" error.

Doing "pip install nvgpu" I get this error repeating:

2024-06-10T19:29:06,095 [WARN ] pool-3-thread-1 org.pytorch.serve.metrics.MetricCollector - worker pid is not available yet.
2024-06-10T19:29:06,384 [ERROR] Thread-6 org.pytorch.serve.metrics.MetricCollector - Traceback (most recent call last):
File "/Users/test2/Yusha-rebase/yusha-app/AnimatedDrawings/torchserve/.venv/lib/python3.12/site-packages/ts/metrics/metric_collector.py", line 27, in
system_metrics.collect_all(sys.modules['ts.metrics.system_metrics'], arguments.gpu)
File "/Users/test2/Yusha-rebase/yusha-app/AnimatedDrawings/torchserve/.venv/lib/python3.12/site-packages/ts/metrics/system_metrics.py", line 119, in collect_all
value(num_of_gpu)
File "/Users/test2/Yusha-rebase/yusha-app/AnimatedDrawings/torchserve/.venv/lib/python3.12/site-packages/ts/metrics/system_metrics.py", line 71, in gpu_utilization
info = nvgpu.gpu_info()
^^^^^^^^^^^^^^^^
File "/Users/test2/Yusha-rebase/yusha-app/AnimatedDrawings/torchserve/.venv/lib/python3.12/site-packages/nvgpu/init.py", line 7, in gpu_info
gpus = [line for line in _run_cmd(['nvidia-smi', '-L']) if line]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/test2/Yusha-rebase/yusha-app/AnimatedDrawings/torchserve/.venv/lib/python3.12/site-packages/nvgpu/init.py", line 32, in _run_cmd
output = subprocess.check_output(cmd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/homebrew/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1955, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'nvidia-smi'

What do I do?

@kr-hari
Copy link

kr-hari commented Sep 2, 2024

Hi, any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants