How to Install CUDA Driver for Cloud GPU on Ubuntu Cloud Servers

2024-09-06 By Nathan 206 Views linux ubuntu gpu cuda driver
0 reviews

CUDA (Compute Unified Device Architecture) is a parallel computing platform and API model created by NVIDIA. It enables significant performance improvements by utilizing the power of NVIDIA GPUs for general-purpose computing. Installing CUDA on Ubuntu Cloud Servers with a cloud GPU allows you to leverage GPU acceleration for tasks such as machine learning, data processing, and scientific simulations. In this guide, we will walk you through the steps to install CUDA drivers on Ubuntu Cloud Servers.


  1. Update your package list and upgrade any existing packages.

    # sudo apt update && sudo apt upgrade -y
    

    cloudgpuubuntu1

  2. Install necessary build and kernel development tools.

    # sudo apt install -y build-essential dkms
    

    cloudgpuubuntu2

  3. The Nouveau driver (open-source GPU driver) needs to be disabled to avoid conflicts with the NVIDIA driver.


    Create a configuration file to blacklist Nouveau:

    # sudo bash -c "echo 'blacklist nouveau' > /etc/modprobe.d/blacklist-nouveau.conf"
    
    # sudo bash -c "echo 'options nouveau modeset=0' >> /etc/modprobe.d/blacklist-nouveau.conf"  
    


    Regenerate the kernel initramfs:

    # sudo update-initramfs -u
    


    Reboot the server:

    # sudo reboot
    

    cloudgpuubuntu3

  4. Go to the LayerStack CUDA Toolkit Download mirror and download the NVIDIA CUDA to the server.

    # wget hk01.layerstack.com/nvidia-linux-grid-550_550.90.07_amd64.deb
    

    cloudgpuubuntu5

  5. Install the CUDA package.

    # dpkg -i nvidia-linux-grid-550_550.90.07_amd64.deb
    

    cloudgpuubuntu6

  6. Download The VGPU license file.

    # wget -P /etc/nvidia/ClientConfigToken hk01.layerstack.com/nv-layerstack-ubuntu24.tok
    

    cloudgpuubuntu7

  7. Verify installation now, reboot the server to apply all changes.

    # sudo reboot
    
  8. After rebooting, check if the GPU drivers and CUDA were installed correctly by running.

    # nvidia-smi
    


    The output will be as in screenshot:

    cloudgpuubuntu9


Related LayerStack Product


Related tutorials for Dedicated GPU service


Related tutorial for Cloud GPU service

What do you think about this article?

Rate this article
LayerStack Promotion
Need assistance?

Try this guide to receive free bundled services at signup on a new free account.

Sign Up

Your Feedback Is Important

We hope you’ll give the new products and updates a try. If you have an idea for improving our products or want to vote on other user ideas so they get prioritized, please submit your feedback on our Community platform. And if you have any questions, please feel free to ask in the Community or contact our Technical Support team.