动手学深度学习 03

敖炜 Lv5

安装

环境

教程里是远程连接ubuntu的云服务器,因为我没去办信用卡,所以没有去白嫖AMS或者Google的服务器,正好我有一个512G的移动硬盘作为我的Ubuntu20.04,所以我决定将其安装这上面

本地安装(CPU的安装,最简单的,不用GPU)

  • [可选]使用conda/miniconda环境

    1
    2
    3
    conda env remove d2l-zh
    conda create -n -y d2l-zh python=3.8 pip
    conda activate d2l-zh
  • 安装需要的包

    1
    pip install -y jupyter d2l torch torchvision
  • 下载代码并执行

    1
    2
    3
    wget https://zh-v2.d2l.ai/d2l-zh.zip
    unzip d2l-zh.zip
    jupyter notebook

我的步骤

  1. 首先要安装基础的编译环境,因为我之前在这上面进行过开发,所以我跳过这一步

    1
    sudo apt install build-essential
  2. 安装python3.8

    1
    sudo apt install python3.8
  3. 安装miniconda

    • 下载:谷歌搜索miniconda进入官网,下载Linux版(python3.8),复制下载链接,使用如下命令
      1
      wget https://repo.anaconda.com/miniconda/Miniconda3-py38_23.5.2-0-Linux-x86_64.sh
    • 安装:使用bash直接安装
      1
      bash Miniconda3-py38_23.5.2-0-Linux-x86_64.sh
  4. 运行bash进入conda的base环境

  5. 下载jupyterd2ltorchtorchvision(需要科学上网)

    1
    pip install jupyter d2l torch torchvision
  6. 下载jupyter记事本文件(压缩包形式)

    1
    wget https://zh-v2.d2l.ai/d2l-zh.zip
  7. 安装unzip

    1
    sudo apt install zip
  8. 解压压缩包文件

    1
    unzip d2l-zh.zip
  9. 复制课程教材

    1
    git clone https://github.com/d2l-ai/d2l-zh-pytorch-slides
  10. 打开jupyter记事本

    1
    jupyter notebook
  11. 安装插件

    1
    pip install rise

QA

  • 标题: 动手学深度学习 03
  • 作者: 敖炜
  • 创建于 : 2023-07-23 10:40:55
  • 更新于 : 2024-04-19 09:27:48
  • 链接: https://ao-wei.github.io/2023/07/23/动手学深度学习-03/
  • 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论