Jump to content

CUDA: Difference between revisions

469 bytes removed ,  18 April 2021
Line 2: Line 2:
==Installation==
==Installation==
===Linux===
===Linux===
[https://www.pugetsystems.com/labs/hpc/How-To-Install-CUDA-10-1-on-Ubuntu-19-04-1405/#Step3)InstallCUDA\ Reference]
[https://developer.nvidia.com/cuda-toolkit CUDA Toolkit]
 
* Install the latest nvidia drivers from the standard repo, e.g. <code>nvidia-drivers-465</code><br>
* Install [https://developer.nvidia.com/cuda-toolkit Cuda Toolkit] separately without the drivers.<br>
** Use one of the deb install options.
* For machine learning, you may also want to install the following:
** [https://developer.nvidia.com/rdp/cudnn-download cuDNN]
** [https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing TensorRT]


See [https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu-installation CUDA Ubuntu Installation]
See [https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu-installation CUDA Ubuntu Installation]
Line 31: Line 24:
# Install development and runtime libraries
# Install development and runtime libraries
sudo apt install libcudnn8 libcudnn8-dev
sudo apt install libcudnn8 libcudnn8-dev
#sudo apt-get install -y libnvinfer6 libnvinfer-dev libnvinfer-plugin6
</syntaxhighlight>
</syntaxhighlight>


For TensorFlow and PyTorch, you may need to add <code>LD_LIBRARY_PATH=/usr/local/cuda/lib64</code> to your environment variables.<br>
 
;Notes
* For machine learning, I just have Anaconda install a compatible CUDA since different versions of TF and PyTorch require different CUDA versions.
 
You may need to add <code>LD_LIBRARY_PATH=/usr/local/cuda/lib64</code> to your environment variables.<br>
You can also do this in PyCharm.<br>
You can also do this in PyCharm.<br>
[[File:Pycharm LD LIBRARY PATH config.png| 200x200px]]
[[File:Pycharm LD LIBRARY PATH config.png| 200x200px]]