In order to make setting up Jupyter Notebook easier, I’ve recently created a simple Docker image for it which coworkers can use without having to install Python et al. Without any kind of wrapper script around it, it gets tedious to enter a different login token every time you initialize a new notebook instance or just restart the same after a reboot.
Luckily, you can fixate the token in jupyter’s configuration file:
$ echo "c.NotebookApp.token = 'something'" > jupyter_notebook_config.py
$ docker run -i -t -p 8888:8888 \
-v $PWD:/var/notebooks \
-v $PWD/jupyter_notebook_config.py:/root/.jupyter/jupyter_notebook_config.py \
reg.company.com/jupyter:latest
Opening up the notebook will now accept “something” as token.
Do you want to give me feedback about this article in private? Please send it to comments@zerokspot.com.
Alternatively, this website also supports Webmentions. If you write a post on a blog that supports this technique, I should get notified about your link π