Skip to content

Commit

Permalink
Binder for running notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Dec 15, 2017
1 parent 44ff54c commit fcc5511
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
22 changes: 22 additions & 0 deletions Dockerfile
@@ -0,0 +1,22 @@
#Dockerfile for running pycamb notebooks with binder
#https://mybinder.org/v2/gh/cmbant/camb/master?filepath=pycamb%2Fdocs%2FCAMBdemo.ipynb

FROM cmbant/cosmobox:python3

ENV NB_USER jovyan
ENV NB_UID 1000
ENV HOME /home/${NB_USER}

RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}

COPY . ${HOME}
USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_USER}

RUN python setup.py build


3 changes: 3 additions & 0 deletions README.rst
Expand Up @@ -11,6 +11,8 @@ GetDist
:target: https://pypi.python.org/pypi/GetDist/
.. image:: https://readthedocs.org/projects/getdist/badge/?version=latest
:target: https://getdist.readthedocs.org/en/latest
.. image:: https://mybinder.org/badge.svg
:target: https://mybinder.org/v2/gh/cmbant/getdist/master?filepath=docs%2Fplot_gallery.ipynb

Description
============
Expand All @@ -26,6 +28,7 @@ from Markov Chain Monte Carlo (MCMC).
* **LaTeX tables** for marginalized 1D constraints

See the `Plot Gallery and tutorial <http://getdist.readthedocs.org/en/latest/plot_gallery.html>`_
(`run online <https://mybinder.org/v2/gh/cmbant/getdist/master?filepath=docs%2Fplot_gallery.ipynb>`_
and `GetDist Documentation <http://getdist.readthedocs.org/en/latest/index.html>`_.


Expand Down
2 changes: 1 addition & 1 deletion docs/plot_gallery.ipynb
Expand Up @@ -26,7 +26,7 @@
"%matplotlib inline\n",
"from __future__ import print_function\n",
"import sys\n",
"sys.path.insert(0,r'c:\\work\\dist\\git\\getdist')\n",
"sys.path.insert(0,os.path.realpath(os.path.join(os.getcwd(),'..')))\n",
"from getdist import plots, MCSamples\n",
"import getdist, IPython\n",
"import pylab as plt\n",
Expand Down

0 comments on commit fcc5511

Please sign in to comment.