docker安装jupyter

发布时间 2023-06-17 11:30:59作者: Netsharp

我想jupyter官方提供了一些镜像搭建一个数学计算的docker容器,数学计算使用jupyter/datascience-notebook比较合适但是下载失败,所以使用基础的镜像jupyter/base-notebook:latest

docker pull jupyter/base-notebook:latest
docker run -p 80:8888 --name jupyter -d a954c1f0a0b5
# 网页中打开jupyter需要提供token,下面是查看token的方法
docker exec -it jupyter bash
jupyter notebook list

科学计算的库需要自己在jupyter/base-notebook:latest容器中手工安装

conda install numpy
conda install sympy

conda install matplotlib会有各种安装错误,所以使用pip安装

pip install matplotlib==3.5.3 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com