Last active
May 15, 2020 14:55
-
-
Save christianramsey/52b74ecc4048f8e3e9ae84afc3ee810b to your computer and use it in GitHub Desktop.
Install TensorFlow GPU for Ubuntu 18.04 - the easy way
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add NVIDIA package repository | |
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb | |
sudo apt install ./cuda-repo-ubuntu1804_10.0.130-1_amd64.deb | |
wget http://developer.download.nvidia.com/compute/machine-learning/repos/https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb | |
sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb | |
sudo apt update | |
# Install CUDA and tools. Include optional NCCL 2.x | |
sudo apt install cuda10.0 cuda-cublas-10-0 cuda-cufft-10-0 cuda-curand-10-0 \ | |
cuda-cusolver-10-0 cuda-cusparse-10-0 libcudnn7 \ | |
libnccl2 cuda-command-line-tools-10-0 | |
# Optional: Install the TensorRT runtime (must be after CUDA install) | |
sudo apt update | |
sudo apt install libnvinfer4=4.1.2-1+cuda10.0 | |
pip install --no-cache-dir tensorflow-gpu | |
# pip install --no-cache-dir tf-nightly-gpu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment