Skip to content

Instantly share code, notes, and snippets.

@pavank
Forked from mjdietzx/waya-dl-setup.sh
Created January 12, 2018 12:53

Revisions

  1. pavank renamed this gist Jan 12, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @mjdietzx mjdietzx revised this gist Jun 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion waya-dl-setup.sh
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ 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 install cuda
    sudo apt-get -y install cuda

    # install cuDNN v6.0
    CUDNN_TAR_FILE="cudnn-8.0-linux-x64-v6.0.tgz"
  3. @mjdietzx mjdietzx revised this gist Apr 18, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion waya-dl-setup.sh
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ sudo apt-get install cuda
    # 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 c${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*
  4. @mjdietzx mjdietzx revised this gist Apr 18, 2017. 1 changed file with 6 additions and 7 deletions.
    13 changes: 6 additions & 7 deletions waya-dl-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,17 @@
    #!/bin/bash

    # assumes `cuda-repo-ubuntu1604_8.0.61-1_amd64.deb` and `cudnn-8.0-linux-x64-v6.0.tgz` are located in working directory

    # download `cuda-repo-ubuntu1604_8.0.61-1_amd64.deb` here: https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
    # download `cudnn-8.0-linux-x64-v6.0.tgz` here: https://developer.nvidia.com/cudnn

    # install CUDA Toolkit v8.0
    # instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
    sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    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 install cuda

    # install cuDNN v6.0
    tar -xzvf cudnn-8.0-linux-x64-v6.0.tgz
    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 c${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*
  5. @mjdietzx mjdietzx revised this gist Apr 17, 2017. 1 changed file with 0 additions and 7 deletions.
    7 changes: 0 additions & 7 deletions waya-dl-setup.sh
    Original file line number Diff line number Diff line change
    @@ -20,10 +20,3 @@ 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}}

    # install pytorch and it's python package dependencies
    sudo pip3 install -U numpy
    sudo pip3 install -U pyyaml
    # Linux, Python 3.5, CUDA Toolkit 8.0
    sudo pip3 install -U http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp35-cp35m-linux_x86_64.whl
    sudo pip3 install -U torchvision
  6. @mjdietzx mjdietzx revised this gist Apr 17, 2017. No changes.
  7. @mjdietzx mjdietzx revised this gist Apr 17, 2017. 1 changed file with 2 additions and 7 deletions.
    9 changes: 2 additions & 7 deletions waya-dl-setup.sh
    Original file line number Diff line number Diff line change
    @@ -21,14 +21,9 @@ sudo chmod a+r /usr/local/cuda-8.0/lib64/libcudnn*
    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}}

    # [optional] install Python 3.6
    sudo add-apt-repository ppa:jonathonf/python-3.6
    sudo apt-get update
    sudo apt-get install -y python3.6 python3-pip

    # install pytorch and it's python package dependencies
    sudo pip3 install -U numpy
    sudo pip3 install -U pyyaml
    # Linux, Python 3.6, CUDA Toolkit 8.0
    sudo pip3 install -U http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp36-cp36m-linux_x86_64.whl
    # Linux, Python 3.5, CUDA Toolkit 8.0
    sudo pip3 install -U http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp35-cp35m-linux_x86_64.whl
    sudo pip3 install -U torchvision
  8. @mjdietzx mjdietzx revised this gist Apr 17, 2017. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions waya-dl-setup.sh
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,9 @@

    # assumes `cuda-repo-ubuntu1604_8.0.61-1_amd64.deb` and `cudnn-8.0-linux-x64-v6.0.tgz` are located in working directory

    # download `cuda-repo-ubuntu1604_8.0.61-1_amd64.deb` here: https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
    # download `cudnn-8.0-linux-x64-v6.0.tgz` here: https://developer.nvidia.com/cudnn

    # install CUDA Toolkit v8.0
    # instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
    sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
  9. @mjdietzx mjdietzx created this gist Apr 17, 2017.
    31 changes: 31 additions & 0 deletions waya-dl-setup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    #!/bin/bash

    # assumes `cuda-repo-ubuntu1604_8.0.61-1_amd64.deb` and `cudnn-8.0-linux-x64-v6.0.tgz` are located in working directory

    # install CUDA Toolkit v8.0
    # instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
    sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
    sudo apt-get update
    sudo apt-get install cuda

    # install cuDNN v6.0
    tar -xzvf cudnn-8.0-linux-x64-v6.0.tgz
    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}}

    # [optional] install Python 3.6
    sudo add-apt-repository ppa:jonathonf/python-3.6
    sudo apt-get update
    sudo apt-get install -y python3.6 python3-pip

    # install pytorch and it's python package dependencies
    sudo pip3 install -U numpy
    sudo pip3 install -U pyyaml
    # Linux, Python 3.6, CUDA Toolkit 8.0
    sudo pip3 install -U http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp36-cp36m-linux_x86_64.whl
    sudo pip3 install -U torchvision