GeForce RTX 3090无法使用mmsegmentation官方推荐cuda版本

这两个月出来实习,第一次接触到计算机视觉。之前好多东西攒在文档里,想着复盘时候再写成博客,唉,失算了,搞完这个bug配成功那个环境后就不想再复盘痛苦的过程了hhh
现写吧还是,留个痕迹

mmsegmentation推荐的是PyTorch 1.6.0 and CUDA 10.1
但是在服务器GeForce RTX 3090上出现warning:

GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37.

这是显卡版本和torch版本不匹配的问题,跟算力有关

还报了一个fatal (后来发现忽略就行)

fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

然后,控制台每显示到这里就卡住了:

2021-09-03 16:31:56,561 - mmcv - INFO - load model from: torchvision://resnet18
2021-09-03 16:31:56,561 - mmcv - INFO - Use load_from_torchvision loader

卡住很久后才会报错emm

subprocess.CalledProcessError: Command '['/home/user/miniconda3/envs/open-mmlab3/bin/python', '-u', './tools/train.py', '--local_rank=1', 'configs/deeplabv3/deeplabv3_r18b-d8_769x769_80k_cityscapes.py', '--launcher', 'pytorch']' returned non-zero exit status 1.

因为上面只是报了一个warning,不知道是不是因为这个问题导致无法运行还纠结了一会,后来重新创建了conda环境,

conda create -n open-mmlab4 python=3.7 -y
conda activate open-mmlab4
conda install pytorch=1.7.0 torchvision cudatoolkit=11.0 -c pytorch
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.7.0/index.html
pip install mmsegmentation

训练命令:

./tools/dist_train.sh configs/deeplabv3/deeplabv3_r18b-d8_769x769_80k_cityscapes.py 2

完事儿
因为服务器上装的是CUDA11.0,所以为了省得试直接在conda里也装了这个。另外可以在mmcv看一下mmcv支持的cuda和torch类型,别匹配了一个没有的。
在这里插入图片描述
另外conda环境名里的4仅代表尝试次数emm

猜你喜欢

转载自blog.csdn.net/qq_45832958/article/details/120085633
RTX
RTX