GPU and DOCA driver installation: Worked Example — Control Plane Installation and Configuration (NVIDIA-Certified Professional: AI Infrastructure)
Introduction to GPU and DOCA Driver Installation In the NVIDIA-Certified Professional: AI Infrastructure exam, GPU and DOCA driver installation is a...
Introduction to GPU and DOCA Driver Installation
In the NVIDIA-Certified Professional: AI Infrastructure exam, GPU and DOCA driver installation is a critical component of the Control Plane Installation and Configuration domain. Proper installation ensures that AI workloads can leverage NVIDIA GPU acceleration and DOCA (Data Center Infrastructure on a Chip Architecture) capabilities effectively.
This worked example walks through a realistic scenario of installing and verifying GPU and DOCA drivers on a Linux-based AI infrastructure node.
Scenario Overview
You are tasked with preparing a new AI compute node running Ubuntu 20.04 LTS. The node will be part of a cluster that uses NVIDIA GPUs for AI acceleration and DOCA-enabled SmartNICs for enhanced networking and security. Your goal is to install the correct NVIDIA GPU drivers and DOCA drivers, verify their functionality, and ensure compatibility with containerized AI workloads.
Step 1: Preparing the System
- Update the package repository and upgrade existing packages:sudo apt update && sudo apt upgrade -y
- Install required dependencies for driver installation:sudo apt install -y build-essential dkms linux-headers-$(uname -r)
Step 2: Installing NVIDIA GPU Drivers
Reasoning: The GPU driver must match the GPU hardware and be compatible with the CUDA version used by AI workloads.
- Identify the GPU model:lspci | grep -i nvidia
- Check the recommended driver version on the NVIDIA Driver Download page.
- Add the NVIDIA package repository:wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pinsudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pubsudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"sudo apt update
- Install the NVIDIA driver package:sudo apt install -y nvidia-driver-525 (replace 525 with the recommended version)
- Reboot the system to load the new driver:sudo reboot
- Verify driver installation:nvidia-smi should display GPU status and driver version.
Step 3: Installing DOCA Drivers
Reasoning: DOCA drivers enable the SmartNIC hardware to offload networking and security functions, critical for AI infrastructure performance.
- Download the DOCA driver package from the NVIDIA DOCA Developer Portal (requires NVIDIA developer account).
- Extract the package:tar -xvf doca-driver-version.tar.gz
- Navigate to the extracted directory and run the installation script:sudo ./install.sh
- Confirm the DOCA driver modules are loaded:lsmod | grep doca
- Check the DOCA device status:doca status (or equivalent DOCA CLI tool)
Step 4: Post-Installation Verification
- Run nvidia-smi to verify GPU visibility and driver version.
- Run doca status to ensure DOCA drivers and devices are operational.
- Check kernel logs for any driver errors:dmesg | grep -i nvidia and dmesg | grep -i doca
Step 5: Preparing for Containerized AI Workloads
With GPU and DOCA drivers installed, the node is ready for NVIDIA Container Toolkit installation to enable GPU access inside Docker containers. This step is essential but covered under a different topic.
Worked Example Summary
Problem: Install and verify NVIDIA GPU and DOCA drivers on an Ubuntu 20.04 AI compute node.
Solution:
- Update system and install dependencies.
- Identify GPU and select appropriate NVIDIA driver version.
- Add NVIDIA repository and install GPU driver.
- Reboot and verify GPU driver with nvidia-smi.
- Download and install DOCA drivers from NVIDIA portal.
- Verify DOCA driver installation and device status.
- Check system logs for errors.
This step-by-step approach ensures the AI infrastructure node is correctly configured for GPU acceleration and DOCA-enabled networking, foundational for deploying advanced NVIDIA AI workloads.
More in this topic
Ready to test your knowledge?
Put what you've learned into practice with a quick quiz and track your progress.
Test your knowledge →