• 【慕伏白教程】 Linux 深度学习服务器配置指北



    镜像烧录

    1. 下载 Ubuntu 镜像

    Ubuntu 桌面版

    Ubuntu

    1. 下载烧录工具

    balenaEtcher

    balenaEtcher

    1. 准备至少 8G空白U盘

    2. 开始烧录

    balenaEtcher_burn


    系统安装

    1. 开机进入BIOS,修改U盘为第一启动

    2. 选择 Try or Install Ubuntu

    GNU GRUB

    1. 往下拉,选择 中文(简体) 后,点击 安装Ubuntu

    Install Ubuntu

    1. 选择 English(US)

    Keyboard

    1. 选择 最小安装

    Minimal

    1. 选择 清理磁盘安装 ,即自动分区

    Clean Disk

    1. 选择时区

    Shanghai

    1. 设置账户,修改姓名、计算机名、用户名一致,方便后续查看,并勾选 自动登录

    Users

    1. 安装完成后,出现提示,拔掉引导盘并按下回车,重启进入系统

    Enter


    系统配置

    1. 是否发送 系统信息 ,选择 定位服务 酌情开启
      System Info

    2. 将中文环境下的Linux系统目录修改为英文

    • 查看当前系统语言环境,并记住,之后要修改回来
    echo $LANG
    
    • 1
    • 修改系统当前语言环境为英文
    export LANG=en_US
    
    • 1
    • 更新目录文件命名
    xdg-user-dirs-gtk-update
    
    • 1
    • 弹出对话框,确定修改,并勾选不再提示

    • 将系统语言环境修改回去

    export LANG=zh_CN.UTF-8
    
    • 1
    • 重启系统
    • 修改系统配置文件(有时会自动修改)
    vim ~/.config/user-dirs.dirs
    
    • 1
    • 注意:
      有时重启后会发现中文目录依然存在,这是因为该目录下存在文件,手动将文件移到对应的英文目录后删除即可。
    1. 修改源
    • 打开 软件和更新 ,修改为阿里源

    Update ori

    • 关闭系统更新

    System Update

    • 关闭,出现弹窗,选择 重新载入

    Refresh

    1. 软件更新
    • 打开软件更新器,点击 立即安装

    常用包安装

    • 更新库
    sudo apt-get update
    sudo apt-get upgrade
    
    • 1
    • 2
    • 安装 Vim
    sudo apt-get install vim
    
    • 1
    • 安装 ssh

      sudo apt-get install ssh
      
      • 1
      • 配置开机自启
      sudo systemctl enable ssh
      
      • 1
    • 安装 curl

    sudo apt install curl
    
    • 1
    • 安装 Zerotier

      curl -s https://install.zerotier.com | sudo bash
      
      • 1
      • 配置 Zerotier
      sudo zerotier-cli join [ID]
      
      • 1
    • 安装 miniconda
      Miniconda清华镜像

      • 下载 latest-Linux 版本
        Miniconda mirror
      • 进入下载目录后安装
      sudo sh ./Miniconda3-latest-Linux-x86_64.sh
      
      • 1
      • 初始化
      conda init
      
      • 1
    • 配置清华源
      清华大学开源软件镜像站 | Tsinghua Open Source Mirror

      • 生成 .condarc 文件
      conda config --set show_channel_urls yes
      
      • 1
      • 修改文件
      vim ~/.condarc
      
      • 1
    • 配置源

    channels:
      - defaults
    show_channel_urls: true
    default_channels:
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
    custom_channels:
      conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
      msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
      bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
      menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
      pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
      pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
      simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
      deepmodeling: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 安装Nvidia显卡驱动

      • 清理已有的Nvidia驱动
      sudo apt-get remove --purge nvidia*
      
      • 1
      • 查看可安装的驱动版本,下载 server 版本
      sudo ubuntu-drivers devices
      
      • 1

      ubuntu-drivers devices

      • 安装驱动
      sudo apt install nvidia-driver-535
      
      • 1
      • 重启
      reboot
      
      • 1
      • 检查是否安装成功
      nvidia-smi
      
      • 1
    • 安装 nvtop

    sudo apt install nvtop
    
    • 1
    • 安装并配置猫猫头
      Set
  • 相关阅读:
    利用redis + mysql 完成签到
    Tomcat经验2
    AQS解读
    【4】c++11新特性(稳定性和兼容性)—>final关键字
    用来生成二维矩阵的dcgan
    dompdf,这么做就可以支持中文了
    http客户端Feign
    论文浅尝 | 探索用于归纳型知识图谱补全的关系语义
    21天打卡挑战 - 经典算法之冒泡排序
    【Verilog基础】【计算机体系结构】cache的分配策略和更新策略
  • 原文地址:https://blog.csdn.net/qq_43377653/article/details/133280179