How to Install CUDA Drivers for Cloud GPU on AlmaLinux Cloud Servers

2024-09-06 By Nathan 360 Views linux almalinux 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 AlmaLinux Cloud Servers.


  1. Update the package list and upgrade existing packages.

    # sudo yum update -y
    

    cloudgpualmalinux1

  2. Install development tools and kernel headers necessary for building the NVIDIA driver.

    # sudo yum groupinstall "Development Tools" -y
    
    # sudo yum install kernel-devel kernel-headers -y
    
    # sudo yum install wget dkms -y
    

    cloudgpualmalinux2

    cloudgpualmalinux3

    cloudgpualmalinux4

  3. The Nouveau driver may interfere with the NVIDIA driver. To disable it, follow these steps:


    Create a 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"
    

    cloudgpualmalinux5


    Rebuild the kernel initramfs:

    # sudo dracut --force
    

    cloudgpualmalinux6


    Reboot the system to apply the changes:

    # sudo reboot
    
  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-1.x86_64.rpm
    
    # rpm -ivh nvidia-linux-grid-550-550.90.07-1.x86_64.rpm
    

    cloudgpualmalinux8

    cloudgpualmalinux9

  5. Install the latest NVIDIA driver (or a specific version if needed):

    # sudo yum install nvidia-driver-latest-dkms -y
    

    cloudgpualmalinux10

  6. Download the VGPU license file.

    # wget hk01.layerstack.com/nv-layerstack-alamlinux8.tok
    

    cloudgpualmalinux11

  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:

    cloudgpualmalinux13


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.