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.
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.
wgetcommand to download the installer using the URL copied in Step 4, as shown in the following figure.
cuda_10.1.105_418.39_linux.runfile, 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
If Result=PASS is returned, the installation is successful.
makecommand, the following error is shown.
After the installation is completed, repeat Step 10 to verify.
yum install -y gcc-c++