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 10.1 as an example to describe how to install CUDA Toolkit on a GPU instance.
https://developer.nvidia.com/cuda-toolkit-archive
.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.
wget
command to download the installer using the URL copied in Step 4, as shown in the following figure.cuda_10.1.105_418.39_linux.run
file, run the following commands in sequence:sudo chmod +x cuda_10.1.105_418.39_linux.run
./cuda_10.1.105_418.39_linux.run --toolkit --samples --silent
echo 'export PATH=/usr/local/cuda/bin:$PATH' | sudo tee /etc/profile.d/cuda.sh
source /etc/profile
cd /usr/local/cuda-10.1/samples/1_Utilities/deviceQuery
make
./deviceQuery
If Result=PASS is returned, the installation is successful.make
command, the following error is shown.yum install -y gcc-c++
After the installation is completed, repeat Step 10 to verify.
Was this page helpful?