nvidia-smi Command Installation on macOS

Page content

How to Install nvidia-smi Command on macOS

If you are using a macOS system and trying to use the nvidia-smi command only to find out it’s not available by default, don’t worry. In this tutorial, we will walk you through the steps to install nvidia-smi on your macOS machine.

Why nvidia-smi is not available by default on macOS

nvidia-smi is a command-line utility provided by NVIDIA for monitoring and managing NVIDIA GPU devices. On macOS systems, NVIDIA GPU drivers do not come pre-installed, which is why the nvidia-smi command is not available out of the box.

Installation Steps

1. Check CUDA Toolkit Installation

Before installing nvidia-smi, make sure you have the CUDA Toolkit installed on your macOS system. If you don’t have it installed, you can download it from the NVIDIA CUDA Toolkit website.

2. Set Environment Variables

After installing the CUDA Toolkit, you need to set the necessary environment variables to access the nvidia-smi command. Open a terminal window and run the following command:

export PATH=/Developer/NVIDIA/CUDA-11.2/bin:$PATH

Replace /Developer/NVIDIA/CUDA-11.2 with the actual path to your CUDA Toolkit installation directory.

3. Verify Installation

To verify that nvidia-smi is now accessible on your macOS system, run the following command in the terminal:

nvidia-smi

If the installation was successful, you should see information about your NVIDIA GPU devices displayed in the terminal.

Conclusion

By following the steps outlined in this tutorial, you should now have nvidia-smi installed and working on your macOS system. This command will allow you to monitor and manage your NVIDIA GPU devices effectively. Happy GPU monitoring!