anaconda安装参照下面这篇文章:
ubuntu18 YOLOv5 配置及训练_simle16的博客-优快云博客_yolov5环境配置ubuntu为
我的显卡是NVIDIA 1050,nvidia-drvier驱动是470版本(驱动单独装),CUDA是10.2,pytorch是1.10,安装命令为:pip install torch==1.10.0+cu102 torchvision==0.11.0+cu102 torchaudio==0.10.0+cu102 -f https://download.pytorch.org/whl/torch_stable.html
注:pytorch、tensorflow版本与cuda、cudnn、python版本有匹配要求,版本对应不上会导致各种运行错误。
python环境下使用如下代码可验证pytorch环境是否正常:
a=torch.Tensor([1,2])
a=a.cuda()
a
使用如下命令从清华源安装指定版本软件:
pip install package==version -i https://pypi.tuna.tsinghua.edu.cn/simple
问题集锦:
问题1:no kernel image is available for execution on the device
原因:pytorch预编译版本不支持老旧GPU
问题2:PyTorch no longer supports this GPU because it is too old
原因:CUDA与Driver不匹配
问题3:创建一个docker环境(命令:conda create -n tensorflow python==3.8),报错:NotWritableError: The current user does not have write permissions to a required path.
原因:非root用户没有对anaconda3文件夹的读写权限。进入anaconda3所安装目录的上一级,例如/home/username/anaconda3/../,输入:sudo chown -R username anaconda3
本文详细介绍了在Ubuntu18.04系统上配置YOLOv5的步骤,包括安装NVIDIA1050显卡驱动470版、CUDA10.2、PyTorch1.10以及验证环境的正确性。特别指出,不同软件版本间需匹配,不匹配可能导致运行错误。此外,还提供了处理conda创建环境时权限问题的方法,并给出了从清华源安装指定版本软件的命令。
4164

被折叠的 条评论
为什么被折叠?



