Overview
Compute Unified Device Architecture (CUDA™) is a computing platform developed by NVIDIA. With a generic parallel computing architecture, CUDA allows GPUs to solve complex computing problems. It includes the CUDA instruction set architecture (ISA) and the parallel computing engine within the GPU. The CUDA platform is designed to work with programming languages such as C, C++, and Fortran. The compiled programs can be run on CUDA-enabled processors.
Because GPU instances use NVIDIA graphic cards, you must install the CUDA Toolkit. This document uses the most common CUDA Toolkit 12.4.0 as an example to describe how to install CUDA Toolkit on a GPU instance.
Operation Steps
1. Go to the CUDA Toolkit download page or visit https://developer.nvidia.com/cuda-toolkit-archive. 2. Select the CUDA version corresponding to the GPU driver. This document takes CUDA Toolkit 12.4.0 as an example, as shown below: 3. Follow the prompts
on the page to select the operating system and installation package sequentially, then copy the wget download command and URL. This document’s selection process is shown below: Note:
Installer Type: We recommend selecting runfile (local).
network: the network installer. It is a small executable and an internet connection is required during the installation.
local: the local installer. It is very large and has all of the components embedded into it.
5. Run the wget command to download the installer using the URL copied in Step 4, as shown in the following figure. Alternatively, you can download the CUDA installation package locally and then upload it to the GPU instance server. After downloading or uploading, use ll to view the files in the current directory.
6. Run the following commands sequentially to grant execute permissions to the installation package. Operations should be performed under the root user. For example, grant execute permissions to the file cuda_12.4.0_550.54.14_linux.run.
chmod +x cuda_12.4.0_550.54.14_linux.run
./cuda_12.4.0_550.54.14_linux.run --toolkit --samples --silent --override
See the figures below:
Note:
During the CUDA installation process, the Driver option indicates whether to install the GPU driver. If you have already installed the GPU driver, deselect this option.
For GPU driver installation, use the dedicated driver installation package. It is not recommended to use the CUDA installation package for installing the GPU driver.
7. Ru
n the following commands in sequence to check whether CUDA Toolkit has been installed: /usr/local/cuda-12.4/bin/nvcc --version
If the CUDA version is displayed, the installation was successful.
3. Select the CUDA Toolkit version, as shown in the following figure. Below uses CUDA Toolkit 12.4.0 as an example.
4. Configure the platform information as instructed, as shown in the following figure.
5. Open the folder containing the downloaded CUDA file and double-click the installation file to start the installation process.
6. The following dialog means the installation is successful.