Skip to content

Latest commit

 

History

History
63 lines (40 loc) · 1.39 KB

Cuda_installation.md

File metadata and controls

63 lines (40 loc) · 1.39 KB

CUDA Installation Script

This script automates the installation process of CUDA on Ubuntu. It supports multiple Ubuntu versions. Follow these steps to install CUDA on your system.

Usage

Run the script with the desired Ubuntu version as an argument:

bash install_cuda.sh <ubuntu_version>

Installation Steps

  1. Download the CUDA pin for Ubuntu 22.04:

    wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
  2. Move the CUDA pin to the appropriate directory:

    sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
  3. Download the CUDA repository package:

    wget https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda-repo-ubuntu2204-12-0-local_12.0.0-525.60.13-1_amd64.deb
  4. Install the CUDA repository package:

    sudo dpkg -i cuda-repo-ubuntu2204-12-0-local_12.0.0-525.60.13-1_amd64.deb
  5. Copy the CUDA keyring to the system keyrings directory:

    sudo cp /var/cuda-repo-ubuntu2204-12-0-local/cuda-*-keyring.gpg /usr/share/keyrings/
  6. Update the package list:

    sudo apt-get update
  7. Install CUDA:

    sudo apt-get -y install cuda

Verification

To verify the installation, you can check the CUDA version:

nvidia-smi -l 1