如何使用Docker映像jupyter / pyspark-notebook在jupyter-notebook上禁用密码或令牌登录

丹尼斯·李

我正在使用docker运行 docker run -it -p 8888:8888 jupyter/pyspark-notebook

/usr/local/bin/start-notebook.sh: running hooks in /usr/local/bin/before-notebook.d
/usr/local/bin/start-notebook.sh: running /usr/local/bin/before-notebook.d/spark-config.sh
/usr/local/bin/start-notebook.sh: done running hooks in /usr/local/bin/before-notebook.d
Executing the command: jupyter notebook
[I 12:52:25.086 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret
[I 12:52:26.010 NotebookApp] JupyterLab extension loaded from /opt/conda/lib/python3.8/site-packages/jupyterlab
[I 12:52:26.010 NotebookApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 12:52:26.014 NotebookApp] Serving notebooks from local directory: /home/jovyan
[I 12:52:26.014 NotebookApp] Jupyter Notebook 6.2.0 is running at:
[I 12:52:26.014 NotebookApp] http://bfd1d14020b6:8888/?token=08fe978d71a160ec97096e68a455eda5c06d411d6fe0a666
[I 12:52:26.014 NotebookApp]  or http://127.0.0.1:8888/?token=08fe978d71a160ec97096e68a455eda5c06d411d6fe0a666
[I 12:52:26.014 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 12:52:26.019 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///home/jovyan/.local/share/jupyter/runtime/nbserver-7-open.html
    Or copy and paste one of these URLs:
        http://bfd1d14020b6:8888/?token=08fe978d71a160ec97096e68a455eda5c06d411d6fe0a666
     or http://127.0.0.1:8888/?token=08fe978d71a160ec97096e68a455eda5c06d411d6fe0a666

我复制了以下链接,它要求我输入密码或令牌,但是当我复制控制台上显示的令牌时,无法对其进行身份验证。

无论如何,我不想使用密码登录笔记本。是否有环境或论据传递给Docker run command这是来自jupyter的官方图片,但我看不到任何相关文档。

伊泰

您可以使用以下命令运行它:

docker run -it -p 8888:8888 jupyter/pyspark-notebook start.sh jupyter notebook --NotebookApp.token=''

假设您处于安全环境中-在此处查看更多信息

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章