Jupyter Notebook On Docker

选择镜像

Jupyter Notebook Jupyter 的不同镜像不是通过Docker Tag来区分的,而是在不同的仓库。

  • jupyter/base-notebook
  • jupyter/minimal-notebook
  • jupyter/r-notebook
  • jupyter/scipy-notebook
  • jupyter/tensorflow-notebook
  • jupyter/datascience-notebook
  • jupyter/pyspark-notebook
  • jupyter/all-spark-notebook

Jupyter官方的镜像说明页面--传送门

我选取了jupyter/datascience-notebook,其中包含Julia, Python, and R 用于数据分析的库。

部署

docker pull jupyter/datascience-notebook
docker run -d --name jupyter -p 88:8888 -v /home/jupyter:/home/jovyan jupyter/datascience-notebook
docker logs jupyter

可在日志中复制Token串,并通过 http://host-name:3000 登入Jupyter Notebook。

安装扩展插件

新建一个python笔记,执行一下命令。

pip install jupyter_contrib_nbextensions
pip install https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
jupyter contrib nbextension install --user

在主页中将会新增Nbextensions的 Tab。