Last active
October 19, 2016 14:00
-
-
Save erikbern/850f3750518347e3901b to your computer and use it in GitHub Desktop.
Install TensorFlow on EC2
This file contains hidden or 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
# Start from ami-763a311e | |
# Install various packages | |
sudo apt-get update | |
sudo apt-get upgrade -y # choose “install package maintainers version” | |
sudo apt-get install -y build-essential python-pip python-dev git python-numpy swig python-dev default-jdk zip zlib1g-dev | |
# Install Bazel | |
git clone https://github.com/bazelbuild/bazel.git | |
cd bazel | |
git checkout tags/0.1.0 | |
./compile.sh | |
sudo cp output/bazel /usr/bin | |
cd | |
# Install TensorFlow | |
rm -rf /tmp # for some reason /tmp is full of crap by now | |
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64" | |
export CUDA_HOME=/usr/local/cuda | |
git clone --recurse-submodules https://github.com/tensorflow/tensorflow | |
cd tensorflow | |
wget "https://gist.githubusercontent.com/infojunkie/cb6d1a4e8bf674c6e38e/raw/5e01e5b2b1f7afd3def83810f8373fbcf6e47e02/cuda_30.patch" | |
git apply cuda_30.patch | |
./configure | |
bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer | |
cd tensorflow/tensorflow/models/image/mnist | |
python convolutional.py | |
# (NOT DONE YET) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment