You can install CUDA on Ubuntu Linux.

Verify you have installed vSphere Bitfusion client on the Ubuntu operating system.

Procedure

  1. Navigate to a directory on the virtual machine in which to download the NVIDIA CUDA distribution.
    cd <download_directory>
  2. Download and move the cuda-ubuntu2004.pin file.
    wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
    sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
  3. Download the NVIDIA CUDA distribution for Ubuntu 20.04 by using the wget command.
    wget <https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda-repo-ubuntu2004-11-0-local_11.0.3-450.51.06-1_amd64.deb>
  4. Install the CUDA 11 package for Ubuntu 20.04 by using the dpkg -i command.
    sudo dpkg -i cuda-repo-ubuntu2004-11-0-local_11.0.3-450.51.06-1_amd64.deb
  5. Install the keys to authenticate the software package by using the apt-key command.
    The apt-key command manages the list of keys used by apt to authenticate packages. Packages which have been authenticated using these keys are considered to be trusted.
    sudo apt-key add /var/cuda-repo-ubuntu2004-11-0-local/7fa2af80.pub
  6. Update and install the CUDA software package.
    sudo apt-get update
    sudo apt-get install cuda
  7. (Optional) To confirm your GPU partition size or verify the resources available on your vSphere Bitfusion deployment, run the NVIDIA System Management Interface (nvidia-smi) monitoring application .
    bitfusion run -n 1 nvidia-smi
  8. Navigate to the directory that contains the CUDA Matrix Multiplication (matrixMul ) sample files.
    cd /usr/local/cuda/samples/0_Simple/matrixMul 
  9. Run the make and bitfusion run commands against the matrixMul sample file.
    sudo make
    bitfusion run -n 1 ./matrixMul

What to do next

Install and configure NVIDIA cuDNN. See Install NVIDIA cuDNN.