Skip to content

Instantly share code, notes, and snippets.

@a-maumau
Last active December 27, 2019 01:29
Show Gist options
  • Save a-maumau/8f778d235b21dc3537812e8d85486948 to your computer and use it in GitHub Desktop.
Save a-maumau/8f778d235b21dc3537812e8d85486948 to your computer and use it in GitHub Desktop.
"""
for Ubuntu 14.04, CUDA8.0
I checked that this is woking on 10/31/2017 in JST
someday it will not...
"""
# Set repository, suck the official.
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
# Select latest nvidia driver [ex. nvidia-381], not nvidia-#-dev
sudo apt-get install nvidia-#
# Download CUDA8 from
# RECOMMENDED CUDA 8, I never had trouble with it.
https://developer.nvidia.com/cuda-80-ga2-download-archive
# Select your environment and file type in the URL.
# Descriptions will show up, follow the descriptions.
# If you choose runfile, it shows up like following.
# Also, don't install the driver through this installer.
sudo sh cuda_8.0.61_375.26_linux.run
# Set path to your shell.
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda
# Reboot to apply setting.
sudo reboot
# Check GPUs and installation successed.
nvidia-smi
# cuDNN, need to be a member, but it's free.
# https://developer.nvidia.com/rdp/form/cudnn-download-survey
# RECOMMEND cuDNN 6.0( or 5.1)
# Download and copy the files.
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
# Set path to your shell
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64"
export CUDA_HOME=/usr/local/cuda
# check CUDA
nvcc -V
# Next thing you have to do is to install the frameworks.
# TensorFlow, Pytorch, Chainer, or ...
# Recommend installing with Anaconda(python)
# For Pytorch, go to http://pytorch.org, and follow the descriptions.
# Recommend with conda, description above is like this, for cuda8, using conda.
conda install pytorch torchvision cuda80 -c soumith
@p-geon
Copy link

p-geon commented Dec 27, 2019

👀
👄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment