一、基础安装

1. 软件包更新

sudo apt update
sudo apt upgrade

2. pip3安装与更新

sudo apt install python3-pip -y
sudo -H pip3 install --upgrade pip

3. 设置root密码

sudo passwd root
su

二、Jtop安装

1. 安装

sudo pip3 install -U jetson-stats
sudo reboot

2. 使用

jtop

三、Jupyter Lab安装

1. 安装Jupyter Lab并重启

pip3 install jupyter jupyterlab
sudo reboot

2. 生成配置文件

配置文件位置为:

/home/username/.jupyter/jupyter_lab_config.py

执行:

jupyter lab --generate-config

3. 修改配置文件

#允许远程连接
c.ServerApp.allow_remote_access = True

#允许远程连接者使用root权限
c.ServerApp.allow_root = True

#服务器监听所有本机IP
c.ServerApp.ip = '0.0.0.0'

#启动Server不打开浏览器
c.ServerApp.open_browser = False

#设置端口默认为8888
c.ServerApp.port = 8888

#设置文件夹
c.ServerApp.root_dir = '/home/li'

4. 启动Jupyter

jupyter lab

远程访问:

http://Jetson_IP:8888
http://ubuntu:8888

四、jetson-inference环境构建

1. 安装依赖库

sudo apt-get install git cmake

2. 下载项目包

git clone https://github.com/dusty-nv/jetson-inference
cd jetson-inference
git submodule update --init

3. 下载Python依赖包

sudo apt-get install libpython3-dev python3-numpy

4. 使用CMake进行配置

cd jetson-inference
mkdir build
cd build

sudo ln -s /usr/lib/python3.10/dist-packages/numpy/core/lib/libnpymath.a /usr/lib/aarch64-linux-gnu/libnpymath.a

sudo ldconfig

cmake ..

cd ~/Programs/jetson-inference/build

make -j$(nproc)

5. 编译项目

sudo make install
sudo ldconfig