LD
LD copied to clipboard
参考install.md 里面配置的环境无法找到cuda
使用这个 https://github.com/HikariTJU/LD/blob/main/docs/install.md 文件配置的环境, 无法找到cuda呢.
(LD) xx@xx:~/uesrs/xxx_exp$ python
Python 3.7.16 (default, Jan 17 2023, 22:20:44)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
False
如果使用 python tools/train.py configs/ld/ld_r50_gflv1_r101_fpn_coco_1x.py --gpu-ids 5
运行代码, 报错如下:
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.4'
xxxxx
ImportError: libc10_cuda.so: cannot open shared object file: No such file or directory
把mmdet/utils/collect_env.py打印的东西发出来看看
python mmdet/utils/collect_env.py
(LD) LD-main$ python mmdet/utils/collect_env.py
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.4'
Traceback (most recent call last):
File "mmdet/utils/collect_env.py", line 15, in <module>
for name, val in collect_env().items():
File "mmdet/utils/collect_env.py", line 9, in collect_env
env_info = collect_base_env()
File "/home/huasi/miniconda3/envs/LD/lib/python3.7/site-packages/mmcv/utils/env.py", line 85, in collect_env
from mmcv.ops import get_compiler_version, get_compiling_cuda_version
File "/home/huasi/miniconda3/envs/LD/lib/python3.7/site-packages/mmcv/ops/__init__.py", line 1, in <module>
from .bbox import bbox_overlaps
File "/home/huasi/miniconda3/envs/LD/lib/python3.7/site-packages/mmcv/ops/bbox.py", line 3, in <module>
ext_module = ext_loader.load_ext('_ext', ['bbox_overlaps'])
File "/home/huasi/miniconda3/envs/LD/lib/python3.7/site-packages/mmcv/utils/ext_loader.py", line 11, in load_ext
ext = importlib.import_module('mmcv.' + name)
File "/home/huasi/miniconda3/envs/LD/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libc10_cuda.so: cannot open shared object file: No such file or directory
使用这个 https://github.com/HikariTJU/LD/blob/main/docs/install.md 文件配置的环境, 无法找到cuda呢.
(LD) xx@xx:~/uesrs/xxx_exp$ python Python 3.7.16 (default, Jan 17 2023, 22:20:44) [GCC 11.2.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import torch >>> torch.cuda.is_available() False
如果使用
python tools/train.py configs/ld/ld_r50_gflv1_r101_fpn_coco_1x.py --gpu-ids 5
运行代码, 报错如下:No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.4' xxxxx ImportError: libc10_cuda.so: cannot open shared object file: No such file or directory
同学我也遇到这个问题,有解决方法吗?
使用这个 https://github.com/HikariTJU/LD/blob/main/docs/install.md 文件配置的环境, 无法找到cuda呢.
(LD) xx@xx:~/uesrs/xxx_exp$ python Python 3.7.16 (default, Jan 17 2023, 22:20:44) [GCC 11.2.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import torch >>> torch.cuda.is_available() False
如果使用
python tools/train.py configs/ld/ld_r50_gflv1_r101_fpn_coco_1x.py --gpu-ids 5
运行代码, 报错如下:No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.4' xxxxx ImportError: libc10_cuda.so: cannot open shared object file: No such file or directory
同学我也遇到这个问题,有解决方法吗?
没有, 我放弃了.
你们用的什么显卡, nvcc -V 看一下
你们用的什么显卡, nvcc -V 看一下
GTX 3090 * 8
你们用的什么显卡, nvcc -V 看一下
GTX 3090 * 8
我可能找到了问题,install.md中下载pytorch的版本默认是cpu版的,到官网下载对应的cuda版就可以了
你们用的什么显卡, nvcc -V 看一下
GTX 3090 * 8
我可能找到了问题,install.md中下载pytorch的版本默认是cpu版的,到官网下载对应的cuda版就可以了
我尝试过了, 但是依然失败了.
你们用的什么显卡, nvcc -V 看一下
GTX 3090 * 8
请问这个问题该如何解决呢?
nvcc -V 看一下
nvcc -V 看一下
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Wed_Jul_14_19:41:19_PDT_2021
Cuda compilation tools, release 11.4, V11.4.100
Build cuda_11.4.r11.4/compiler.30188945_0
我想到了几种方法,你试一下:
- 使用pip安装
pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
- 使用docker, repo 提供的dockerfile 我测试过在A100上是可用
我想到了几种方法,你试一下:
- 使用pip安装
pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
- 使用docker, repo 提供的dockerfile 我测试过在A100上是可用
非常感谢您的回复, 我已经解决了这个问题.