Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into petrosrizos-master

Conflicts:
	README.md
  • Loading branch information
DanielSlater committed May 7, 2016
1 parent 6adf883 commit 94b7e99
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 12 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
@@ -0,0 +1,11 @@
FROM ubuntu:latest
RUN apt-get update && apt-get -y install python-dev build-essential git x11-apps
RUN apt-get install -y python-setuptools python-pip python-pygame python-matplotlib python-numpy python-scipy
RUN pip install cv2
RUN pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
RUN git clone https://github.com/Theano/Theano.git
RUN cd ./Theano && python setup.py develop
COPY ./ /opt/PyDataLondon2016
ENV PYTHONPATH /opt/PyDataLondon2016/
WORKDIR /opt/PyDataLondon2016
RUN git submodule init && git submodule update
10 changes: 10 additions & 0 deletions Makefile
@@ -0,0 +1,10 @@
bootstrap:
brew cask install xquartz
brew install socat
build:
docker build -t pydatalondon2016
run:
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" &
docker run --net=host -it -e DISPLAY=`ipconfig getifaddr en0`:0 pydatalondon2016 /bin/bash

all: bootstrap build run
33 changes: 21 additions & 12 deletions README.md
Expand Up @@ -2,16 +2,6 @@

This repository contains the resources needed for the tutorial, Building a Pong playing AI in just 1 hour(Plus 4 days training time)

## Requirements

* [Python 2](https://www.python.org/downloads/)
* [PyGame](http://www.pygame.org/download.shtml)
* [TensorFlow](https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html#download-and-setup)
* [Matplotlib](http://matplotlib.org/users/installing.html)

Tensorflow requires an NVidia GPU and only runs on Linux/Mac so if you don't have these Theano is an option (see below). The examples are all in Tensorflow, but that translates very easily to Theano and we have an example Q-learning Theano implementation that can be extended to work with Pong.


### Installation Guide for OS X

Tested on a Macbook Pro (late 2013) with El Capitan, unsure if GPU-support works.
Expand Down Expand Up @@ -78,6 +68,23 @@ Run an example:
python 1_random_half_pong_player.py
```

### Linux Nvidea GPU installation Guide

* [Python 2](https://www.python.org/downloads/)
* [PyGame](http://www.pygame.org/download.shtml)
* [TensorFlow](https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html#download-and-setup)
* [Matplotlib](http://matplotlib.org/users/installing.html)

Tensorflow requires an NVidia GPU and only runs on Linux/Mac so if you don't have these Theano is an option (see below). The examples are all in Tensorflow, but that translates very easily to Theano and we have an example Q-learning Theano implementation that can be extended to work with Pong.

## Windows/non nvidia gpu

#### [Python](https://www.python.org/downloads/)
Either 2 or 3 is fine.
#### [PyGame](http://www.pygame.org/download.shtml)
Download which ever version matches the version of Python you plan on using.
#### [Matplotlib](http://matplotlib.org/users/installing.html)
Match version

### [Theano Installation Guide for Windows](http://deeplearning.net/software/theano/install.html)

Expand All @@ -100,8 +107,10 @@ cd Theano
python setup.py develop
```

Set your project interpreter to be using anaconda python

###Docker environment alternative
#### Docker build
Have a look at the Makefile, essentially this helps you setup an xquartz environment exposed to a docker container along with the required dependencies.
'make all' should in theory launch you into an environment capable of running th examples straight away.

## Resources

Expand Down

0 comments on commit 94b7e99

Please sign in to comment.