Skip to content

Instantly share code, notes, and snippets.

@ktmud
Created November 14, 2018 00:04
Show Gist options
  • Save ktmud/f7fc1a6610d6394c153307618a66fd6f to your computer and use it in GitHub Desktop.
Save ktmud/f7fc1a6610d6394c153307618a66fd6f to your computer and use it in GitHub Desktop.

Step 1: Install Python 3.6

I use anaconda:

wget https://repo.anaconda.com/archive/Anaconda3-5.3.0-MacOSX-x86_64.sh
bash ./Anaconda3-5.3.0-MacOSX-x86_64.sh
conda create -n idp intelpython3_full python=3
source activate idp

Intel Python is still using Python 3.6.5 as the time of writing.

Step 2: Install Java8 and Bazel

brew cask install homebrew/cask-versions/java8
brew tap bazelbuild/tap
brew tap-pin bazelbuild/tap
brew install bazel

Step 3: Configure Tensorflow

git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
./configure

You can use default answers, with the exception of following configs:

Do you wish to build TensorFlow with CUDA support? [y/N]: y
CUDA support will be enabled for TensorFlow.

Please specify the CUDA SDK version you want to use. [Leave empty to default to CUDA 9.0]: 10.0

You should have downloaded CUDA Toolkit and cuDNN. After downloading cuDNN, you simply uncompress it to /user/local/cuda.

Please specify a list of comma-separated Cuda compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases your build time and binary size. [Default is: 3.5,7.0]: 6.1

Here you must specify the capability of your GPU. Follow the link in the prompt.

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