Jupyter Docker Authentication

I am trying to install a docker container for a jupyter laptop on my Mac laptop. With the following options

docker run -dit --rm -p 8888:8888 gcr.io/tensorflow/tensorflow

The container starts up and I can evaluate it at http: // [cointainer-IP]: 8888, as expected.

However, it displays me on the authentication screen and requests a token. How to get a token, which log should I look for in the docker container?

+5
source share
2 answers

stdout URL-, . ( -d) docker logs <container_id>. :

[I 16:57:05.859 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[W 16:57:05.871 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 16:57:05.877 NotebookApp] Serving notebooks from local directory: /notebooks
[I 16:57:05.877 NotebookApp] 0 active kernels 
[I 16:57:05.877 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:8888/?token=42685cc246e6571c0f16417327fbf4c398061125c00edea5
[I 16:57:05.877 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 16:57:05.878 NotebookApp] 

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8888/?token=42685cc246e6571c0f16417327fbf4c398061125c00edea5
+3

, :

docker exec -it <docker container name> bash -c 'jupyter notebook list' | grep http | cut -f1 -d ' ' | xargs xdg-open

Ubuntu 18.04

0

Source: https://habr.com/ru/post/1677373/


All Articles