-
-
Save abkfenris/53c1dacca5fed296094e to your computer and use it in GitHub Desktop.
| FROM ipython/notebook | |
| MAINTAINER Alex Kerney <[email protected]> | |
| RUN apt-get install -y -q python-numpy python-scipy python-matplotlib python-pandas python-sympy python-nose |
By the way, I'm running using the -t and -i options on docker run:
git clone https://gist.github.com/53c1dacca5fed296094e.git
cd 53c1dacca5fed296094e
docker build -t alex .
docker run -p 8888:8888 -i -t alex
To get around the first issue, I set the matplotlib backend.
import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
To deal with the $DISPLAY issue, setting it to localhost:0 won't actually work. Right now it runs as root within the container.
What would you think about making the default user be student or ipynb. If people pull from the containers, they can always set up the user they want too.
If I do %matplotlib inline instead of %matplotlib that works fine:
http://nbviewer.ipython.org/gist/abkfenris/672448d1c016e98b4115
This is also just docker run -d -p 8889:8888 notebook
Just made a repo https://github.com/ipython/docker-notebook
What about changing the CMD to something like python notebook --no-browser --port 8888 --ip=* --pylab inline
Ah, sure enough.
I definitely don't want the base ipython/notebook image to have pylab inline set. Willing to have an opinionated install that's easy to set up for students.
Any thoughts on how you would want the user of the notebook set up?
And that was me not reading what I pasted, here's the repo: https://github.com/abkfenris/docker-ipython-matplotlib
I just changed the CMD and it will override the one from base.
What do you mean 'how you would want the user of the notebook set up?' On my own computer I've tweaked the CSS, I think in the default profile, but thats about it.
docker buildworks flawlessly and all the packages are installed.There's an issue with the Pseudo-TTY allocated by Docker though. This impacts matplotlib.
http://nbviewer.ipython.org/gist/rgbkrk/138efc771de853531117
I need to do some digging on this anyway, as the IPython dev team noticed issues with timing on shell access (unless done in a
subprocess.call).