0李沐动手学深度学习v2/环境准备

配置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
# 进入conda base环境,后续都base环境中操作
bash
# python安装d2l torch torchvision
pip install 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
[1]:from notebook.auth import passwd
[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

你可能感兴趣的:(深度学习,深度学习,ubuntu,python)