Docker

The docker-compose setup in the docker directory will bring up a demo instance which is exposed on your port 8080 of your local machine. It can be used as a reference for your own setups.

Manual Installation

Prerequisites

  • python 3.6+

  • mongodb >= 2.4.x

  • npm

  • yarn

I’ve only just installed mongodb

Cool! First let’s spin up an mongodb instance so that our notebook reports have somewhere to live. Using mongodb also allows us to search through the metadata of completed reports, so we can do more interesting queries

  1. Start a mongo instance

$ mongod --dbpath <path/to/db_directory>
  1. Create a mongo user

$ mongo
> use admin
> db.createUser({user: 'jon', pwd: 'hello', roles: ['readWrite']})

First Run of Notebooker

NB: mongo should be running as above for these steps to work!

  1. Install notebooker

$ pip install notebooker
  1. Set up the ipykernel which runs Notebooks

$ python -m ipykernel install --user --name=notebooker_kernel
  1. Run the webapp!

$ notebooker-cli --mongo-host localhost:27017 --mongo-user jon --mongo-password hello start-webapp --port 11828
  1. Open the link that is printed in your web browser.

INFO:notebooker.web.main:Notebooker is now running at http://localhost:11828`

Installing and Running Notebooker locally

Sometimes it is a bit simpler to get things up and running by running locally. It is also useful if you wish to play around with the notebook_examples. NB: mongo should be running as above for these steps to work!

  1. Clone notebooker

git clone https://github.com/man-group/notebooker.git
  1. Python setup

cd notebooker
python setup.py develop
  1. Run npm install & yarn bundle

cd ./notebooker/web/static/
npm install
yarn bundle
cd ../../../
  1. Set up the ipykernel which runs Notebooks

$ python -m ipykernel install --user --name=notebooker_kernel
  1. Install notebook requirements

$ pip install -r notebooker/notebook_templates_example/notebook_requirements.txt
  1. Run the webapp!

$ notebooker-cli --mongo-host localhost:27017 --mongo-user jon --mongo-password hello start-webapp --port 11828
  1. Open the link that is printed in your web browser.

INFO:notebooker.web.main:Notebooker is now running at http://localhost:11828`

Exporting to PDF

If you want to convert your output to PDF, then you will have to install xelatex, as per nbconvert:

OSError: xelatex not found on PATH, if you have not installed xelatex you may need to do so.
Find further instructions at https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex.