Dev.to Machine Learning2h ago|Products & ServicesTutorials & How-To

Setting Up NVIDIA Drivers and CUDA for ML/DL on Ubuntu 22.04

A step-by-step guide on installing the latest NVIDIA drivers and CUDA toolkit on Ubuntu 22.04 for machine learning and deep learning projects.

đź’ˇ

Why it matters

Proper setup of NVIDIA drivers and CUDA is crucial for leveraging GPU acceleration in machine learning and deep learning projects, which can significantly improve performance.

Key Points

  • 1Uninstall old NVIDIA drivers and CUDA installations
  • 2Install NVIDIA drivers version 595 and CUDA 12.1
  • 3Configure NVIDIA driver pinning to ensure stability
  • 4Install cuDNN 8.9 for CUDA 12.1 to enable GPU acceleration
  • 5Verify the installation and setup for TensorFlow and PyTorch

Details

The article provides a comprehensive guide on setting up the NVIDIA graphics drivers and CUDA toolkit on Ubuntu 22.04 for machine learning and deep learning workloads. It starts by thoroughly uninstalling any existing NVIDIA and CUDA components to ensure a clean slate. Then, it walks through the steps to install the latest NVIDIA drivers (version 595) and CUDA 12.1, including pinning the driver version to maintain stability. The guide also covers the installation of cuDNN 8.9, which is the recommended version to work with both TensorFlow and PyTorch. Finally, it verifies the successful setup by running the nvidia-smi command. This guide aims to simplify the often complex process of configuring the GPU-accelerated ML/DL environment on Ubuntu, making it more accessible for developers.

Like
Save
Read original
Cached
Comments
?

No comments yet

Be the first to comment

AI Curator - Daily AI News Curation

AI Curator

Your AI news assistant

Ask me anything about AI

I can help you understand AI news, trends, and technologies