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
Start a mongo instance
$ mongod --dbpath <path/to/db_directory>
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!
Install notebooker
$ pip install notebooker
Set up the ipykernel which runs Notebooks
$ python -m ipykernel install --user --name=notebooker_kernel
Run the webapp!
$ notebooker-cli --mongo-host localhost:27017 --mongo-user jon --mongo-password hello start-webapp --port 11828
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!
Clone notebooker
git clone https://github.com/man-group/notebooker.git
Python setup
cd notebooker
python setup.py develop
Run npm install & yarn bundle
cd ./notebooker/web/static/
npm install
yarn bundle
cd ../../../
Set up the ipykernel which runs Notebooks
$ python -m ipykernel install --user --name=notebooker_kernel
Install notebook requirements
$ pip install -r notebooker/notebook_templates_example/notebook_requirements.txt
Run the webapp!
$ notebooker-cli --mongo-host localhost:27017 --mongo-user jon --mongo-password hello start-webapp --port 11828
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.