Last active
October 17, 2024 23:17
-
Star
(192)
You must be signed in to star a gist -
Fork
(67)
You must be signed in to fork a gist
-
-
Save bogdan-kulynych/f64eb148eeef9696c70d485a76e42c3a to your computer and use it in GitHub Desktop.
Install CUDA 10 on Ubuntu 18.04
This file contains 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
# WARNING: These steps seem to not work anymore! | |
#!/bin/bash | |
# Purge existign CUDA first | |
sudo apt --purge remove "cublas*" "cuda*" | |
sudo apt --purge remove "nvidia*" | |
# Install CUDA Toolkit 10 | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/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 && sudo apt update | |
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb | |
sudo apt update | |
sudo apt install -y cuda | |
# Install CuDNN 7 and NCCL 2 | |
wget https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb | |
sudo dpkg -i nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb | |
sudo apt update | |
sudo apt install -y libcudnn7 libcudnn7-dev libnccl2 libc-ares-dev | |
sudo apt autoremove | |
sudo apt upgrade | |
# Link libraries to standard locations | |
sudo mkdir -p /usr/local/cuda-10.0/nccl/lib | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libnccl.so.2 /usr/local/cuda/nccl/lib/ | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.7 /usr/local/cuda-10.0/lib64/ | |
echo 'If everything worked fine, reboot now.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While doing
sudo apt install -y cuda=10.0.130-1
I ran into a error:cuda : Depends: cuda-10-0 (>= 10.0.130) but it is not going to be installed
. Runningsudo dpkg --force-all -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
fixed it for me. Note, though, that that will overwrite any existing versions.