Installing Cuda
CUDA 12.3 should have already been installed as part of the virtual machine creation.
Check the installation of the NVIDIA CUDA Toolkit
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.
Installing the NVIDA CUDA Toolkit
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.
Install Cuda 12.3
Download the CUDA keyring package
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.
This command installs the downloaded CUDA keyring package:
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.
Update package lists from repositories on system including the newly added CUDA repository
This command will then install the CUDA package and its dependencies on your system
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.
Last updated