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

完成。

  • 3
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值