Installing Cuda
Last updated
Last updated
CUDA 12.3 should have already been installed as part of the virtual machine creation.
What is the CUDA Toolkit?
The NVIDIA CUDA Toolkit provides a development environment for creating high performance GPU-accelerated applications.
With the CUDA Toolkit, you can develop, optimise, and deploy your applications on GPU-accelerated systems.
The toolkit includes GPU-accelerated libraries, debugging and optimisation tools, a C/C++ compiler, and a runtime library to deploy your application.
If not installed, follow the instructions below.
First, check to see if the CUDA Toolkit is installed, we can check to see whether the core compiler is installed, the NVIDIA CUDA Compiler (NVCC)
Nvidia CUDA Compiler (NVCC) is a part of the CUDA Toolkit. It is the compiler for CUDA, responsible for translating CUDA code into executable programs.
NVCC takes high-level CUDA code and turns it into a form that can be understood and executed by the GPU.
It handles the partitioning of code into segments that can be run on either the CPU or GPU, and manages the compilation of the GPU parts of the code.
First, to check if NVCC is installed and its version, run
If the NVIDIA CUDA Toolkit has been installed, the output will look something like this:
You should see release 12.3 - which indicates the CUDA Toolkit Version 12.3 has been successfully installed.
This command uses wget
to download the CUDA keyring package from the specified URL.
The CUDA keyring package is a digital signature package that ensures the authenticity of the CUDA repositories.
The dpkg -i
flag is used to install the downloaded CUDA keyring package (cuda-keyring_1.0-1_all.deb
).
Installing the keyring package adds the CUDA repository's GPG key to the system's keyring, allowing the package manager to verify the integrity of the CUDA packages.
The -y
flag automatically answers "yes" to any prompts during the installation process, allowing the installation to proceed without user intervention.
The cuda
package is a meta-package that installs the CUDA Toolkit, including the CUDA libraries, runtime, and development tools.
After the installation is complete, you will have the CUDA Toolkit and runtime installed on your Ubuntu environment, enabling you to develop and run CUDA-accelerated applications using NVIDIA GPUs.