Skip to content

Instantly share code, notes, and snippets.

@coreylynch
Last active June 18, 2017 09:50
Show Gist options
  • Save coreylynch/c294496e7c42946798c67e7f5ba94259 to your computer and use it in GitHub Desktop.
Save coreylynch/c294496e7c42946798c67e7f5ba94259 to your computer and use it in GitHub Desktop.
Setting up tensorflow / keras / gym on an c4.8xlarge EC2 instance
# Not a bash script, just the commands that worked for me
# C compiler
sudo yum groupinstall 'Development Tools'
# Virtualenv
sudo pip install --upgrade virtualenv
virtualenv --system-site-packages ~/tensorflow
# Tensorflow (virtualenv)
source ~/tensorflow/bin/activate
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
# IPython
pip install ipython
# Keras
pip install keras
python -c "import keras"
vim ~/.keras/keras.json, then change "backend": "theano" to "backend": "tensorflow"
# Skimage
sudo yum install libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel python-matplotlib python-numpy python-pil python-scipy libpng-devel
pip install matplotlib
pip install -U scikit-image
# OpenAI gym
sudo yum install -y python-numpy python-dev cmake zlib1g-dev libjpeg-dev xvfb libav-tools xorg-dev python-opengl
pip install gym
git clone https://github.com/openai/gym.git
cd gym
pip install -e '.[all]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment