You can install CUDA on Ubuntu Linux.

Procedure

  1. Navigate to a directory on the virtual machine in which to download the NVIDIA CUDA distribution.
    cd <download_directory>
  2. Download the NVIDIA CUDA distribution for your version of Ubuntu using the wget command.
    You can download appropriate the NVIDIA CUDA package for your version of Ubuntu from the NVIDIA download site.
    Option Description
    Ubuntu 16.04 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo- ubuntu1604_10.0.130-1_amd64.deb
    Ubuntu 18.04 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda- repo-ubuntu1804_10.0.130-1_amd64.deb
    wget <NVIDIA_CUDA_download_URL>
  3. Install the CUDA package for your version of Ubuntu version using the dpkg -i command.
    sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
  4. Install the keys to authenticate the software package 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. Specify the keys for your version of Ubuntu.
    Option Description
    Ubuntu 16.04 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
    Ubuntu 18.04 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
    sudo apt-key adv --fetch-keys <authentication_key_URL>
  5. Update and install the CUDA software package.
    sudo apt-get update
    sudo apt-get install cuda-10.0 
  6. 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
  7. Navigate to the directory containing the CUDA Matrix Multiplication (matrixMul ) sample files.
    cd /usr/local/cuda/samples/0_Simple/matrixMul 
  8. 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.