Skip to content

Instantly share code, notes, and snippets.

@AndrewWalker
Created January 26, 2014 11:39
Show Gist options
  • Save AndrewWalker/8631428 to your computer and use it in GitHub Desktop.
Save AndrewWalker/8631428 to your computer and use it in GitHub Desktop.
# IPython notebook build process for Ubuntu 12.04 from pypi
#
# This is probably very far from good practice for docker, but it's a demonstration
# of how to get very precise control of an environment that suitable for testing
#
# docker build -t ipynb .
# docker run -t -i -p 127.0.0.1:8888:8888 ipynb
FROM ubuntu
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
ADD https://raw.github.com/pypa/pip/master/contrib/get-pip.py /
RUN python get-pip.py
# numpy
RUN apt-get install -y python-dev
RUN pip install -vvv numpy
# scipy
RUN apt-get install -y libatlas-dev liblapack-dev gfortran g++
RUN pip install -vvv scipy
# matplotlib
RUN apt-get install -y libfreetype6-dev libpng-dev
RUN pip install -vvv matplotlib
# ipython notebook
RUN pip install -vvv ipython[all]
EXPOSE 8888
CMD ipython notebook --pylab=inline --ip=*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment