▶ 构建镜像

1、编辑 Dockerfile

FROM python:3# 安装 NodejsRUN apt update && curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt install -y nodejs# 安装 jupyterlabRUN python -m pip install jupyterlab# 安装 jupyterlab 插件RUN jupyter labextension install @jupyterlab/git && pip install jupyterlab-git && jupyter serverextension enable --py jupyterlab_git# 设置默认环境变量ENV NOTEBOOK_APP_TOKEN=anoyi NOTEBOOK_DIR=/home# 暴露端口号EXPOSE 8888#  运行 jupyterlabCMD jupyter lab --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token=${NOTEBOOK_APP_TOKEN} --notebook-dir=${NOTEBOOK_DIR}

2、构建镜像

docker  build -t jupyterlab .

▶ 相关资料

  • Github:https://github.com/jupyterlab/jupyterlab
  • 文档:JupyterLab Documentation
  • 插件:https://github.com/Yogayu/awesome-jupyterlab-extension