Last active
December 27, 2019 01:29
-
-
Save a-maumau/8f778d235b21dc3537812e8d85486948 to your computer and use it in GitHub Desktop.
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
""" | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👀
👄