安装jtop
sudo apt-get install python3-pip
sudo -H pip3 install -U jetson-stats
sudo jtop
更换镜像源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
配置CUDA
sudo vi /home/jetson/.bashrc 末尾添加两行
export PATH=/usr/local/cuda-10.2/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
保存退出,source生效
source /home/jetson/.bashrc
nvcc -V
安装TensorFlow GPU版(不使用不装)
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran
sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v44 tensorflow
下载tensorflow.whl文件,然后安装
pip3 install Cython
pip3 install tensorflow-2.1.0+nv20.4-cp36-cp36m-linux_aarch64.whl --use-feature=2020-resolver
安装keras(不使用不装)
sudo python3 -m pip install keras
TensorRT 环境搭建
默认安装了TensorRT
如果要使用python接口的tensorrt,则需要安装pycuda
pip3 install pycuda
jetson-inference(不使用不装)
sudo apt-get install libpython3-dev python3-numpy
sudo apt-get install git cmake
git config --global http.postBuffer 5242880000
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
git clone https://github.com/dusty-nv/jetson-inference # 手动下载
git clone --recursive https://github.com/dusty-nv/jetson-inference
cd jetson-inference
将jetson-inference需要的包里所有内容复制到jetson-inference/data/networks下
git init
git submodule update --init
mkdir build
cd build
git init
git submodule update --init
# 解决办法 由于没有公钥,无法验证下列签名: NO_PUBKEY 0CC3FD642696BFC8
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0CC3FD642696BFC8
sudo apt-get update
编辑jetson-inference/CMakePrebuild.sh。把./download-models.sh注释掉,(前面加个#注释)
cmake ../
../CMakePreBuild.sh
安装exfat-fuse,挂载移动硬盘
sudo apt-get install exfat-fuse
安装vscode
sudo apt-get install curl
curl -L https://github.com/toolboc/vscode/releases/download/1.32.3/code-oss_1.32.3-arm64.deb -o code-oss_1.32.3-arm64.deb
sudo dpkg -i code-oss_1.32.3-arm64.deb
摄像头
sudo apt-get install v4l-utils
安装伺服舵机包(Servo)
sudo python3 -m pip install adafruit-circuitpython-servokit
安装面部识别相关库(不使用不装)
sudo apt-get install cmake libopenblas-dev liblapack-dev libjpeg-dev
wget http://dlib.net/files/dlib-19.17.tar.bz
tar jxvf dlib-19.17.tar.bz2
cd dlib-19.17
vi dlib/cuda/cudnn_dlibapi.cpp 注释掉 //Forward_algo = forward_best_algo; 保存
sudo python3 setup.py install
sudo pip3 install face_recognition
测试 python3 import face-recogniton
安装pip
sudo apt-get install python3-pip python3-dev
python3 -m pip install --upgrade pip #升级pip
安装机器学习包
sudo apt-get install python3-numpy
sudo apt-get install python3-scipy
sudo apt-get install python3-pandas
sudo apt-get install python3-matplotlib
sudo apt-get install python3-sklearn
vnc远程桌面控制
sudo apt-get update
sudo apt-get install vino
cd ~
sudo ln -s ../vino-server.service /usr/lib/systemd/user/graphical-session.target.wants
gsettings set org.gnome.Vino prompt-enabled false
gsettings set org.gnome.Vino require-encryption false
sudo vi /usr/share/glib-2.0/schemas/org.gnome.Vino.gschema.xml
在key内容添加到文件的最后面(key name ='notify-on-connect'后面)
<key name='enabled' type='b'>
<summary>Enable remote access to the desktop</summary>
<description>
If true, allows remote access to the desktop via the RFB
protocol. Users on remote machines may then connect to the
desktop using a VNC viewer.
</description>
<default>false</default>
</key>
sudo glib-compile-schemas /usr/share/glib-2.0/schemas
gsettings set org.gnome.Vino authentication-methods "['vnc']"
gsettings set org.gnome.Vino vnc-password $(echo -n '登录密码'|base64)
sudo reboot
设置开机启动VNC
gsettings set org.gnome.Vino enabled true
mkdir -p ~/.config/autostart
sudo vi ~/.config/autostart/vino-server.desktop
[Desktop Entry]
Type=Application
Name=Vino VNC server
Exec=/usr/lib/vino/vino-server
NoDisplay=true