使用Docker部署Jupyter Notebook

安装TensorFlow版

#创建本地文件夹
mkdir -p /usr/local/docker/root/

#创建,v映射前面是本地,后面是docker路径
docker run -d -p 8866:8888 -v /usr/local/docker/jupyter_notebook/:/tf/  tensorflow/tensorflow:nightly-py3-jupyter

设置密码

#进入docker
docker exec -it d4 /bin/bash
#进入docker容器,设置密码
jupyter notebook password
#然后重启docker

开启:自动补全

#进入Docker容器后,使用命令
pip install jupyter_contrib_nbextensions  -i https://mirrors.aliyun.com/pypi/simple/
#开始安装nbextension
jupyter contrib nbextension install --user --skip-running-check

#在标签页"nbextension",启动"Hinterland"

#参考网址
https://www.jianshu.com/p/0ab80f63af8a

安装皮肤

#安装
pip install jupyterthemes -i https://mirrors.aliyun.com/pypi/simple/

#安装主题
jt -t oceans16 -N -T   #推荐
jt -t monokai -N -T

安装三方库

安装Pandas

!pip install pandas -i https://mirrors.aliyun.com/pypi/simple/

安装Pytorch

#去官网
https://pytorch.org/
#根据系统配置下载链接
pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
#在末尾增加清华镜像链接
-i https://pypi.tuna.tsinghua.edu.cn/simple    
#例子
pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html -i https://pypi.tuna.tsinghua.edu.cn/simple

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值