Last active
October 18, 2018 16:11
-
-
Save mulderu/9b231057b999491e63b267bc5a636153 to your computer and use it in GitHub Desktop.
python install tip
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
------------------------------------------------------- | |
#!/bin/bash | |
# install CUDA Toolkit v8.0 | |
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network)) | |
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb" | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG} | |
sudo dpkg -i ${CUDA_REPO_PKG} | |
sudo apt-get update | |
sudo apt-get -y install cuda-8-0 | |
# install cuDNN v6.0 | |
CUDNN_TAR_FILE="cudnn-8.0-linux-x64-v6.0.tgz" | |
wget http://developer.download.nvidia.com/compute/redist/cudnn/v6.0/${CUDNN_TAR_FILE} | |
tar -xzvf ${CUDNN_TAR_FILE} | |
sudo cp -P cuda/include/cudnn.h /usr/local/cuda-8.0/include | |
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda-8.0/lib64/ | |
sudo chmod a+r /usr/local/cuda-8.0/lib64/libcudnn* | |
# set environment variables | |
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}} | |
------------------------------------------------------------------------------------------------- | |
#---------------------------- new on anaconda --------------- | |
conda install pytorch torchvision -c pytorch | |
conda install -c conda-forge tensorflow-gpu | |
#--------------------------------------------------------------- | |
# ubuntu cuda8 cudnn5 tensorflow1.2 | |
# TF | |
$ pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.2.0-cp27-none-linux_x86_64.whl | |
# scikit | |
$ conda install scikit-image | |
# kera | |
$ conda install -c conda-forge keras | |
# check | |
# https://www.nvidia.com/en-us/data-center/gpu-accelerated-applications/tensorflow/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment