Permalink
Browse files

Added docker support and installation guide

  • Loading branch information...
1 parent 4f772ab commit 529ff887f355540ba53f3594679515d00eda0fcc @xamox xamox committed Nov 11, 2014
Showing with 82 additions and 0 deletions.
  1. +51 −0 Dockerfile
  2. +31 −0 README.markdown
View
@@ -0,0 +1,51 @@
+# Build with
+# sudo docker -t="simplecv" .
+# Run with
+# sudo docker run -p 54717:8888 -t -i simplecv
+
+FROM ubuntu:12.04
+
+MAINTAINER Anthony Oliver <anthony@sightmachine.com>
+
+# Install system dependencies
+RUN apt-get update
+RUN apt-get install -y apt-utils
+RUN apt-get install -y unzip
+RUN apt-get install -y wget
+RUN apt-get install -y clang
+RUN apt-get install -y cmake
+RUN apt-get install -y python2.7
+RUN apt-get install -y python2.7-dev
+RUN apt-get install -y python-setuptools
+RUN wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py -O - | python
+
+# SimpleCV Specific
+RUN apt-get install -y libopencv-*
+RUN apt-get install -y python-opencv
+RUN apt-get install -y python-numpy
+RUN apt-get install -y python-scipy
+RUN apt-get install -y python-pygame
+# RUN pip install PIL
+RUN pip install ipython
+RUN pip install pyzmq
+RUN pip install jinja2
+RUN pip install tornado
+
+# SimpleCV Install
+RUN wget https://github.com/sightmachine/SimpleCV/archive/master.zip
+RUN unzip master
+RUN cd SimpleCV-master; pip install -r requirements.txt; python setup.py install
+
+# Use clang
+ENV CC clang
+ENV CXX clang++
+
+# Environment setup
+EXPOSE 8888
+ENV USER docker
+WORKDIR /home/docker
+
+# Setup the notebook
+RUN echo 'ipython notebook --ip=0.0.0.0 --port=8888 --no-browser' >> start.sh
+RUN chmod +x start.sh
+CMD bash -C '/home/docker/start.sh';'bash'
View
@@ -9,6 +9,7 @@ Quick Links:
* [About](#about)
* [Installation](#installation)
+ * [Docker] (#docker)
* [Ubuntu](#ubuntu-1204)
* [Virtual Environment](#virtualenv)
* [Arch Linux](#arch-linux)
@@ -56,6 +57,36 @@ For more code snippets, we recommend the [SimpleCV examples website](http://exam
The easiest way to install SimpleCV is with the packages for your distribution (Windows, Mac, Linux) included on the website (http://www.simplecv.org). Although it is tested on many platforms there maybe scenarios where it just won't work with the package installer. Below is instructions on how to install, if you have problems please see the troubleshooting section at the end of this README file.
+<a id="docker"></a>
+### Docker
+This is the recommended way of installing SimpleCV as you can be sure the environment will be setup the same exact way as it's suppose to be on your machine.
+
+*WARNING*: Using docker does not allow the webcam to work, it also doesn't work with Image.show(), so essentially requires you to use simplecv within an IPython notebook.
+
+The first step is to install docker on your machine if you have not, this should work for Windows, Mac, and Linux, please follow instructions at:
+<a href="https://docs.docker.com/installation/">https://docs.docker.com/installation/</a>
+
+Once docker is installed you can run simplecv as easy as (may have to run as sudo, depending on OS):
+
+ docker pull sightmachine/simplecv
+
+It will probably take a little while to download, but once done just run (may need to run as sudo, depending on OS):
+
+ docker run -p 54717:8888 -t -i simplecv
+
+Then just open your web browser and go to:
+
+ http://localhost:54717
+
+You will get a Ipython notebook inteface, start a new notebook and enter the following:
+
+ from SimpleCV import *
+ disp = Display(displaytype='notebook')
+ img = Image('simplecv')
+ img.save(disp)
+
+You should now see the simplecv logo and now have a full simplecv environment setup to start playing around.
+
<a id="ubuntu-1204"></a>
### Ubuntu 12.04
Install with pip

0 comments on commit 529ff88

Please sign in to comment.