@tina
To install CUDA on Ubuntu, you will need to follow these steps:
sudo dpkg -i cuda-repo-ubuntu*_10.1.243-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
nvidia-smi
This command should display information about your GPU, including its model and the amount of memory it has. If the command runs successfully and you see this information, your CUDA installation is complete.
Note: These instructions are for CUDA 10.1. If you are using a different version of CUDA, you may need to modify the commands slightly. It is also a good idea to read the installation instructions in the CUDA documentation before proceeding.
@tina
To install CUDA on Ubuntu, you will need to follow these steps:
1
|
lspci | grep -i nvidia |
If the command returns any output, then your system has a CUDA-capable GPU.
1
|
lsb_release -a |
1 2 |
sudo apt-get update sudo apt-get install nvidia-driver-<version> |
Replace <version> with the version of the NVIDIA driver that is compatible with your GPU and Ubuntu version. You can find a list of supported driver versions on the NVIDIA website.
1 2 3 4 5 6 7 |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu<version>/x86_64/cuda-ubuntu<version>.pin sudo mv cuda-ubuntu<version>.pin /etc/apt/preferences.d/cuda-repository-pin-600 wget https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda-repo-ubuntu<version>_11.1.1-1_amd64.deb sudo dpkg -i cuda-repo-ubuntu<version>_11.1.1-1_amd64.deb sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub sudo apt-get update sudo apt-get -y install cuda |
Replace <version> with the version of Ubuntu you are using (e.g., 18.04, 20.04, etc.).
1 2 |
export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH |
After completing these steps, CUDA should be installed on your system and you should be able to use it to develop GPU-accelerated applications.