seeing how I can embed existing notebook repos into this nifty jupyter-heroku deploy repo.
story do far...
- cloned both repos
- copied entire notebook repo into ./notebooks/
- Can specify conda requirements in environment.yml and pip deps as well. See https://elements.heroku.com/buildpacks/conda/conda-buildpack, there is a 300Mb limit. dependencies are listes in notebook repo. these are jupyter, PIL, matplotlib, pandas, seaborn, xlrd, scikit-learn. pip deps are beuatifulsoup glypy mechanize. all added to environment.yml
- git add README.md ./notebooks environment.yml
- add conda_runtime.txt (as I happen to need python2)
- git commit -m "awesome message"
- git push origin master
- go to github repo and use heroku deploy button
Use this application to deploy Jupyter Notebook to heroku or CloudFoundry. If a postgres database is available, pgcontents is used as notebook storage.
Jupyter will not start, if the environment variable JUPYTER_NOTEBOOK_PASSWORD
was not set.
If you want to customize your app, easiest is to fork this repository.
If you forked this repository, you can link it to your heroku app afterwards.
Push this repository to your app or fork this repository on github and link your repository to your heroku app.
Use the heroku-buildpack-conda:
$ heroku buildpacks:set https://github.com/pl31/heroku-buildpack-conda.git -a <your_app>
Jupyter notebook will not start until the environment variable
JUPYTER_NOTEBOOK_PASSWORD
is set. Use a good password:
$ heroku config:set JUPYTER_NOTEBOOK_PASSWORD=<your_passwd> -a <your_app>
If you are really sure, that you do not want a password protected notebook
server, you can set JUPYTER_NOTEBOOK_PASSWORD_DISABLED
to DangerZone!
.
- Clone this repository
- Create a postgres database service with name
jupyter-db
- Deploy using
cf push
- Set
JUPYTER_NOTEBOOK_PASSWORD
usingcf set-env
. Do not forget to restart application.
JUPYTER_NOTEBOOK_PASSWORD
: Set password for notebooksJUPYTER_NOTEBOOK_PASSWORD_DISABLED
: Set toDangerZone!
to disable password protectionJUPYTER_NOTEBOOK_ARGS
: Additional command line args passed tojupyter notebook
; e.g. get a more verbose logging using--debug
If you want to use a special python version, you should set it in your environment.yml:
name: root
dependencies:
- python=2.7
- ...