最近服务器重置,需要重新安装环境,总是安装失败,记录一下。
首先说明一下我的服务器是3090,安装coda版本10+一开始发现算力不匹配,然后删除重新安装,cuda11.7.1 pytorch1.13.0
https://pytorch.org/
根据自己的配置安装对应的版本就好了。
1、新建环境
conda create -n open-mmlab python=3.8
#安装到指定目录
conda create --prefix=/DATA/用户名/conda/envs/环境名 python=版本号
2、进入环境安装对应的cuda,这里是根据我自己配置选择的。
3、开始安装,网上教程很多,这里建议先看官方文档!!!
https://mmdetection.readthedocs.io/zh_CN/latest/get_started.html
4、开始安装对应的mmcv-full,这里我用是这个:
pip install openmim
mim install mmdet
5、上面的安装需要在新建的环境之下。安装mmdetection:
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -r requirements/build.txt
pip install -v -e . # or "python setup.py develop"
安装之后会在目录下出现文件夹mmdetection:
安装完成。