Ubuntu20.04LTS 安装 mmdetection 全记录

Ubuntu20.04LTS 安装 mmdetection 全记录

  • 环境需求
  • 准备工作
    • anaconda安装
    • gcc / g++ 安装
    • 安装nvidia显卡驱动
    • 安装CUDA
  • 正式安装mmdetection
    • 创建一个conda虚拟环境
    • 安装PyTorch和Torchvision
    • 安装mmcv
    • mmdetection安装
  • 后记

环境需求

Requirements:

· Linux (Windows is not officially supported)
这里使用的Linux环境为 ubuntu 20.04 LTS

· Python 3.5+ (Python 2 is not supported)

· PyTorch 1.1 or higher

· CUDA 9.0 or higher
这里安装的CUDA版本为10.2,具体安装的版本主要根据各自安装的系统推荐

· NCCL 2

· GCC 4.9 or higher

· mmcv

准备工作

安装mmdetection需要安装很多额外的东西,也踩了很多坑,这里进行列举并介绍安装过程

anaconda安装

1.进入anaconda官网下载好对应的安装包

2.直接在命令行输入

bash ~/Downloads/Anaconda3-2020.07-Linux-x86_64.sh

安装 anaconda,这里的anaconda版本根据你安装的版本

3.进入安装页面,一直按enter,之后遇到Do you accept the license terms? [yes|no],输入yes,之后按一下enter,会提示你设置安装地址

Anaconda3 will now be installed into this location:
/home/用户名/anaconda3
Press ENTER to confirm the location
Press CTRL-C to abort the installation
Or specify a different location below

强烈建议默认即可,
按enter继续下一步,注意这里按ctrl + c 直接会终止安装。
接下来先等待安装即可。
看到Thank you for installing Anaconda3! 表示安装成功。

4.输入

source ~/.bashrc

更新环境变量,之后就能正常使用啦
关于anaconda安装的更多问题参考博客:Ubuntu安装anaconda 介绍、安装、配置

gcc / g++ 安装

你可能感兴趣的:(Ubuntu20.04LTS 安装 mmdetection 全记录)