jetson-inference AI学习库在jetsonnano上安装【学习笔记】

jetson-inference AI学习库在jetsonnano上安装【学习笔记】,第1张

jetson-inference AI学习库在jetsonnano上安装【学习笔记】

jetsonnano(A02)、Jetpack4.6

https://github.com/dusty-nv/jetson-inference/blob/master/docs/building-repo-2.mdhttps://github.com/dusty-nv/jetson-inference/blob/master/docs/building-repo-2.md本人全程参考上面网站中 *** 作。由于网络原因,GitHub上克隆仓库会很慢,而且很可能会失败;就算手动下载,本项目仓库中含有子库,也会出问题(亲测)。故本人做了些改进。全程 *** 作如下:

一、获取源码

首先打开终端运行如下代码:

$ sudo apt-get update
$ sudo apt-get install git cmake libpython3-dev python3-numpy
$ git clone --recursive https://gitee.com/weikun-xuan/jetson-inference.git

上面仓库源我全都自己换了,下载会比GitHub快很多。

二、换源

进入到tools文件下:

$cd jetson-inference/tools

换下源,依次运行以下代码(均在tools文件下):

1)模型下载国内源:

$sed -in-place -e 's@https://nvidia.box.com/shared/static@https://bbs.gpuworld.cn/mirror@g' download-models.sh

2)pytorch国内源:

$sed -in-place -e 's@https://nvidia.box.com/shared/static@https://bbs.gpuworld.cn/mirror@g' install-pytorch.sh

$sed -in-place -e 's@https://github.com/pytorch/vision@https://gitee.com/vcan123/pytorch@g' install-pytorch.sh

$sed -in-place -e 's@https://github.com/dusty-nv/vision@https://gitee.com/vcan123/dusty-nv@g' install-pytorch.sh
三、编译安装

在jetson-infernce文件下执行如下 *** 作:

$mkdir build
$cd build
$cmake ../

 接着就会出现:

 此步为安装模型包,本人建议【全部取消】,不然会有些慢,之后我们可以去https://github.com/dusty-nv/jetson-inference/releases  手动下载。

我们继续:

 安装pytorch。这时应该只有一个for python 3.6版本,选上然后ok。

完成后还是在build文件下依次执行如下 *** 作:

$ make
$ sudo make install
$ sudo ldconfig

完成。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5491076.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-12
下一篇2022-12-12

发表评论

登录后才能评论

评论列表(0条)

    保存