首页 > 其他 > 详细

Docker 镜像 - 构建 JupyterLab With Plugin

时间:2019-06-12 03:01:00      阅读:163      评论:0      收藏:0      [点我收藏+]
技术分享图片

? 构建镜像

1、编辑 Dockerfile

FROM python:3

# 安装 Nodejs
RUN apt update && curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt install -y nodejs

# 安装 jupyterlab
RUN 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

#  运行 jupyterlab
CMD 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 .

? 相关资料

Docker 镜像 - 构建 JupyterLab With Plugin

原文:https://blog.51cto.com/10723525/2407401

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!