jupyter / tmpnb

Creates temporary Jupyter Notebook servers using Docker containers. [DEPRECATED - See BinderHub project]
https://github.com/jupyterhub/binderhub
BSD 3-Clause "New" or "Revised" License
528 stars 123 forks source link

Start with specific notebook, skip browser #225

Closed tammojan closed 8 years ago

tammojan commented 8 years ago

I'm writing a tutorial + kernel for my favorite language, TaQL. I'd like to redirect tmpnb directly to the notebook, instead of presenting users with the Jupyter browser first (so exactly the Nature use case). Where would I specify this? Since jupyter launches with --no-browser, I cannot specify it as a command line option to jupyer. I'm using start-notebook.sh, etc.

If this is the wrong place to ask this, please point to a better place. Thanks!

rgbkrk commented 8 years ago

As long as the notebook will always be in the same place, there's a --redirect-uri option to tmpnb (orchestrate.py).

docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN \
           -v /var/run/docker.sock:/docker.sock \
           jupyter/tmpnb python orchestrate.py \
             --image='jupyter/nature-demo' \
             --redirect-uri='/notebooks/Nature.ipynb' \ # This is assumed to be a path after /user/whatever/
             --command="jupyter notebook --NotebookApp.base_url={base_path} --ip=0.0.0.0 --port {port}"

I can't recall if/how our command differs there.

tammojan commented 8 years ago

@rgbkrk Great, that works. Thanks for the quick reply!

rgbkrk commented 8 years ago

No problem. :cake: