【发布时间】:2023-03-17 23:10:02
【问题描述】:
我想在一个子域中使用 adminuser 和另外 10 个用户运行 jupyterlab。我的第一步是构建一个 Dockerfile。当我运行 docker jupyter 时,我无法使用此令牌登录。 有警告 JupyterLab 服务器扩展未启用,手动加载.. 如何修复警告?
当我复制 http://(e7ed07c07f1e or 127.0.0.1):8888/?token=a0dd4edab37a679497593f8e565c75e8fa5d1939fa8cc003 在浏览器中,浏览器在google中搜索。
我收到这条消息:
Step 7/7 : ENTRYPOINT ["jupyter", "lab", "--allow-root","--ip=0.0.0.0", "--no-browser"]
---> Running in 1c47b913a54c
Removing intermediate container 1c47b913a54c
---> 9068548fcfbb
Successfully built 9068548fcfbb
Successfully tagged jupyter:latest
[jklein@tobbie jupyter]$ docker run jupyter
[I 11:24:19.707 LabApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[I 11:24:20.018 LabApp] JupyterLab extension loaded from /opt/conda/lib/python3.7/site-packages/jupyterlab
[I 11:24:20.018 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[W 11:24:20.020 LabApp] JupyterLab server extension not enabled, manually loading...
[I 11:24:20.022 LabApp] JupyterLab extension loaded from /opt/conda/lib/python3.7/site-packages/jupyterlab
[I 11:24:20.022 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 11:24:20.023 LabApp] Serving notebooks from local directory: /
[I 11:24:20.023 LabApp] The Jupyter Notebook is running at:
[I 11:24:20.023 LabApp] http://(e7ed07c07f1e or 127.0.0.1):8888/?token=a0dd4edab37a679497593f8e565c75e8fa5d1939fa8cc003
[I 11:24:20.023 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 11:24:20.023 LabApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://(e7ed07c07f1e or 127.0.0.1):8888/?token=a0dd4edab37a679497593f8e565c75e8fa5d1939fa8cc003
Dockerfile
FROM continuumio/miniconda3
# Updating and upgrading packages
RUN apt-get update -y \
&& apt-get install -y \
&& apt-get upgrade -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN conda update -y conda
RUN conda install -y jupyter \
jupyterlab
# Setup application
EXPOSE 8888
ENTRYPOINT ["jupyter", "lab", "--allow-root","--ip=0.0.0.0", "--no-browser"]
【问题讨论】:
标签: docker jupyter jupyter-lab