Step 1
apt-get install build-essential dkms freeglut3 freeglut3-dev libxi-dev libxmu-dev
Step 2
I went to the CUDA websiite for installation instructions.
Step 3
I have got the installer URL via the «Download» button:
Step 4
I have downloaded the installer:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
Step 5
dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
apt-get update
apt install cuda-toolkit-10-0
Step 6
reboot
Step 7
Then I checked that the Nvidia's driver is installed:
lspci -k | grep -A 2 -i "VGA"
Step 8
Then I checked the installed CUDA version.
It was 10.1 in my case:
Tensorflow 1.13 is not compatible with CUDA 10.1, so I downgraded CUDA from 10.1 to 10.0
Step 9
Then I checked the installed Nvidia driver version:
nvidia-smi
- docs.nvidia.com/cuda/cuda-quick-start-guide/index.html#ubuntu-x86_64-deb
- pugetsystems.com/labs/hpc/How-To-Install-CUDA-10-together-with-9-2-on-Ubuntu-18-04-with-support-for-NVIDIA-20XX-Turing-GPUs-1236
Step 10
I have added to /root/.bash_profile
:
export CUDADIR=/usr/local/cuda-10.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.0/lib64
export PATH=$PATH:/usr/local/cuda-10.0/bin
Step 11
Then I reloaded /root/.bash_profile
:
source ~/.bash_profile
Step 12
Then I cheched the environment variables:
echo "$CUDADIR"
echo "$LD_LIBRARY_PATH"
echo "$PATH"
Step 13
cuda-install-samples-10.0.sh ~
Step 14
cd ~/NVIDIA_CUDA-10.0_Samples/5_Simulations/nbody
make