How to disable password request for a Jupyter notebook session?

前端 未结 9 1355
灰色年华
灰色年华 2020-12-02 10:24

I have been launching Jupyter Notebook for years using the following command:

jupyter-notebook --port=7000 --no-browser --no-mathjax

When I t

9条回答
  •  萌比男神i
    2020-12-02 10:56

    For me, the solutions described above was not applicable in Docker.

    The following solution works like a charm on Linux:

    Details:

    • used image: tensorflow/tensorflow:latest-py3-jupyter
    • password I configured: 'password'
    • run Jupyter as a user (not root)

    Steps to start Jupyter in Docker with your pre-defined password:

    1. export JUPYTER_TOKEN='password'
    2. docker run -it --rm -p 8888:8888 -u $(id -u ${USER}):$(id -g ${USER}) -e JUPYTER_TOKEN=$JUPYTER_TOKEN -v /home//jupyter:/tf/ tensorflow/tensorflow:latest-py3-jupyter
    3. open http://localhost:8888 and use 'password' as your password
    4. save password in ypur browser

    For me, that is the easiest way to get rid of the annoying token authentication.

提交回复
热议问题