这篇文章介绍怎么安装英伟达的AI学习库Jetson-Inference
(一)下载jetson-inference
剩下的过程就比较简单了。首先如果您没有安装git和cmake,先安装它们
sudo apt-get install git cmake
接着从git上克隆jetson-inference
git clone https://github.com/dusty-nv/jetson-inference
cd jetson-inference
git submodule update --init
(二)关键点
下面开始有分流了,有两种方法
第一种,直接可以下载网络模型的,可以直接配置cmake,选择你要下载的模型,以及是否安装pytorch等。
mkdir build
cd build
cmake ../
第二种,通过浏览器下载
进入tools这个目录,里面有download-models.sh这个文件,用gedit打开
根据函数里的网址,一个一个下好,我是在jetson-inference目录下新建了downloads这个文件夹,并把下载好的文件放在这个文件夹下面
然后修改刚刚打开的文件,找到attempt_download_file和attempt_download_archive这两个函数进行修改,修改完代码如下:
function attempt_download_file()
{
local filename=$1
if [ -e ../downloads/$filename ]
then
local wget_status=0
else
local wget_status=1
fi
local wget_status=$?
if [ $wget_status != 0 ]; then
echo "$LOG No such file '$filename' (error code=$wget_status)"
return $wget_status
fi
mv ../downloads/$filename $OUTPUT_DIR
return 0
}
function attempt_download_archive()
{
local filename=$1
if [ -e ../downloads/$filename ]
then
local wget_status=0
else
local wget_status=1
fi
if [ $wget_status != 0 ]; then
echo "$LO