ti3090安装cuda113+cudnn+anaconda+yolopose过程

wget https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux.run

sudo sh cuda_11.3.1_465.19.01_linux.run

如果有了nvidia driver,可以不用install driver选项。

配置环境变量:
export PATH=“/usr/local/cuda-11.4/binKaTeX parse error: Expected '}', got 'EOF' at end of input: {PATH:+:{PATH}}”
export LD_LIBRARY_PATH=“/usr/local/cuda-11.4/lib64KaTeX parse error: Expected '}', got 'EOF' at end of input: …LIBRARY_PATH:+:{LD_LIBRARY_PATH}}”

source ~/.bashrc

https://blog.csdn.net/weixin_43301333/article/details/121537145

root@f5e52d307978:~/Downloads# sudo cp /var/cudnn-local-repo-ubuntu2004-8.5.0.96/cudnn-local-0579404E-keyring.gpg /usr/share/keyrings/

root@f5e52d307978:~/Downloads# sudo dpkg -i cudnn-local-repo-ubuntu2004-8.5.0.96_1.0-1_amd64.deb 

(Reading database ... 66858 files and directories currently installed.)
Preparing to unpack cudnn-local-repo-ubuntu2004-8.5.0.96_1.0-1_amd64.deb ...
Unpacking cudnn-local-repo-ubuntu2004-8.5.0.96 (1.0-1) over (1.0-1) ...
Setting up cudnn-local-repo-ubuntu2004-8.5.0.96 (1.0-1) ...

The public CUDA GPG key does not appear to be installed.
To install the key, run this command:
sudo cp /var/cudnn-local-repo-ubuntu2004-8.5.0.96/cudnn-local-0579404E-keyring.gpg /usr/share/keyrings/

root@f5e52d307978:/# cd var
root@f5e52d307978:/var# ls
backups cache cudnn-local-repo-ubuntu2004-8.5.0.96 lib local lock log mail opt run spool tmp
root@f5e52d307978:/var# cd cudnn-local-repo-ubuntu2004-8.5.0.96/
root@f5e52d307978:/var/cudnn-local-repo-ubuntu2004-8.5.0.96# ls
0579404E.pub Local.md5 Packages Release cudnn-local-0579404E-keyring.gpg libcudnn8-samples_8.5.0.96-1+cuda11.7_amd64.deb
InRelease Local.md5.gpg Packages.gz Release.gpg libcudnn8-dev_8.5.0.96-1+cuda11.7_amd64.deb libcudnn8_8.5.0.96-1+cuda11.7_amd64.deb

root@f5e52d307978:/var/cudnn-local-repo-ubuntu2004-8.5.0.96# sudo apt-get install libcudnn8-samples_8.5.0.96-1+cuda11.7_amd64.deb
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package libcudnn8-samples_8.5.0.96-1+cuda11.7_amd64.deb
E: Couldn’t find any package by glob ‘libcudnn8-samples_8.5.0.96-1+cuda11.7_amd64.deb’
E: Couldn’t find any package by regex ‘libcudnn8-samples_8.5.0.96-1+cuda11.7_amd64.deb’
root@f5e52d307978:/var/cudnn-local-repo-ubuntu2004-8.5.0.96#

验证

上面的cuda和cudnn安装之后可以reboot重启一下,输入以下命令检验是否安装成功:

cd /usr/local/cuda-11.4/samples/1_Utilities/deviceQuery
sudo make
./deviceQuery

pass说明,安装成功。

安装anaconda

bash ana…sh

在这里插入图片描述
这里安装的是cuda113 python3.8

需要等一会儿,下载各种包

torch.cuda.is_available()
True

pip 修改镜像源

  1. 临时使用:

在使用pip的时候加参数-i

例如:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple gevent

常用的pip源如下:

pypi 清华大学源:https://pypi.tuna.tsinghua.edu.cn/simple
pypi 豆瓣源 :http://pypi.douban.com/simple/
pypi 腾讯源:http://mirrors.cloud.tencent.com/pypi/simple
pypi 阿里源:https://mirrors.aliyun.com/pypi/

test yololandmark

(yolo) root@f5e52d307978:~/Projects/yolo5landmark# python detect.py --device 0 --conf 0.001 --iou 0.65 --weights runs/train/exp/weights/best.pt --source data/images/zidane.jpg --kpt-label

Namespace(agnostic_nms=False, augment=False, classes=None, conf_thres=0.001, device=‘0’, exist_ok=False, hide_conf=False, hide_labels=False, img_size=640, iou_thres=0.65, kpt_label=True, line_thickness=3, name=‘exp’, nosave=False, project=‘runs/detect’, save_bin=False, save_conf=False, save_crop=False, save_txt=False, save_txt_tidl=False, source=‘data/images/zidane.jpg’, update=False, view_img=False, weights=[‘runs/train/exp/weights/best.pt’])
YOLOv5 � 2022-12-30 torch 1.11.0 CUDA:0 (NVIDIA GeForce RTX 3090, 24268.3125MB)

Fusing layers…
RepConv.fuse_repvgg_block
RepConv.fuse_repvgg_block
/root/anaconda3/envs/yolo/lib/python3.8/site-packages/torch/functional.py:568: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/conda/conda-bld/pytorch_1646755903507/work/aten/src/ATen/native/TensorShape.cpp:2228.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Model Summary: 366 layers, 9900136 parameters, 10144 gradients, 11.8 GFLOPS
image 1/1 /root/Projects/yolo5landmark/data/images/zidane.jpg: tensor(0.70898, device=‘cuda:0’)
640x640 4 faces, Done. (0.022s)
Results saved to runs/detect/exp3
Done. (0.071s)

请添加图片描述

(yolo) root@f5e52d307978:~/Projects/yolo5landmark# python detect_face_pose.py --conf 0.001 --iou 0.65 --weights runs/train/exp/weights/best.pt --image data/images/zidane.jpg

Namespace(conf_thres=0.001, image=‘data/images/zidane.jpg’, img_size=640, iou_thres=0.65, weights=[‘runs/train/exp/weights/best.pt’])
Fusing layers…
RepConv.fuse_repvgg_block
RepConv.fuse_repvgg_block
/root/anaconda3/envs/yolo/lib/python3.8/site-packages/torch/functional.py:568: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/conda/conda-bld/pytorch_1646755903507/work/aten/src/ATen/native/TensorShape.cpp:2228.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
img.shape: torch.Size([1, 3, 384, 640])
orgimg.shape: (720, 1280, 3)

train

python train.py --data w300_kpts.yaml --cfg yolov5s6_w300kpts_RepStem.yaml --weights weights/yolov5s6.pt --batch-size 32 --workers 4 --device 7 --img 640 --kpt-label

开始在远程服务器上训练!!!

test

python test300WV1.py --data w300_kpts.yaml --img 640 --conf 0.001 --iou 0.65 --batch-size 4 --device 0 --weights runs/train/exp2/weights/best.pt --kpt-label

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

烧技湾

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值