配置miniconda

# 下载miniconda安装命令文件
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.12.0-Linux-x86_64.sh
# 安装miniconda
bash Miniconda3-py38_4.12.0-Linux-x86_64.sh
# 创建d2l-zh虚拟环境
conda create -n d2l-zh -y python=3.8 pip
conda activate d2l-zh
# python安装d2l torch torchvision。 pip install d2l==0.16.1
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyter d2l torch torchvision
# ubuntu安装zip
apt install zip
# 获取
wget https://zh-v2.d2l.ai/d2l-zh.zip
# 解压
unzip d2l-zh.zip
# ubuntu安装git
apt install git
# git
git clone https://github.com/d2l-ai/d2l-zh-pytorch-slides.git
# python安装播放幻灯片插件
pip install rise

配置jupyter

# 生成jupyter_notebook_config.py
jupyter notebook --generate-config
# 生成秘钥
ipython
#新版jupyter 
In [1]:from jupyter_server.auth import passwd
#旧版jupyter
In [1]:from notebook.auth import passwd
In [2]:passwd()
Enter password: XXXX
Verify password: XXXX
Out[2]: '一串密钥'
# 编辑jupyter_notebook_config.py
vim /root/.jupyter/jupyter_notebook_config.py
# 启动jupyter notebook
jupyter notebook --allow-root

jupyter_notebook_config.py

c.NotebookApp.password=u'一串密钥'
c.NotebookApp.allow_remote_access = True
c.NotebookApp.ip='*'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888

浏览器访问jupyter notebook

127.0.0。1:8888
Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐