Linux

Jetson TX2 Setup Introduction

2021-04-25  本文已影响0人  红薯爱帅

1. 准备工作

2. 初始化Jetson TX2

$ sudo arp-scan -l --interface=wlp3s0
$ head -n 1 /etc/nv_tegra_release
# R28 (release), REVISION: 1.0, GCID: 9379712, BOARD: t186ref, EABI: aarch64, DATE: Thu Jul 20 07:59:31 UTC 2017
$ ./JetPack-L4T-3.1-linux-x64.run
# 如果网络不给力,可以执行
$ proxychains4 ./JetPack-L4T-3.1-linux-x64.run
image.png
image.png

3. 安装部署

$ ssh nvidia@10.30.4.216
$ mkdir -p /home/nvidia/xray /pai
$ sudo chown nvidia:nvidia /pai
$ sudo mount -t ext4 -o loop my_backup.img.raw /mnt
$ scp -r /mnt/home/nvidia/xray/release nvidia@10.30.4.216:/home/nvidia/xray
$ sudo scp -r /mnt/pai nvidia@10.30.4.216:/
$ sudo scp /mnt/etc/matplotlibrc nvidia@10.30.4.216:/pai
# 在Jetson将matplotlibrc剪切到/etc目录
$ sudo mv /pai/matplotlibrc /etc/

4. 启动测试

$ sudo sh /home/nvidia/xray/release/run-detector.sh
$ sudo apt-get install httpie
$ cd /mnt/pai/data/models/detector/xray/tests
$ http -f http://10.30.4.216:8080/service/detect/xray search@00001.png
$ http -f http://10.30.4.216:8080/service/detect/xray search@00002.png

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 684
Content-Type: application/json
Server: TornadoServer/4.5.2

{
    "boxes_detected": [
        {
            "box": [
                0.2646198830409357, 
                0.546875, 
                0.1827485380116959, 
                0.26875
            ], 
            "puid": "Phone", 
            "score": 0.9966097474098206, 
            "type": "Phone"
        }, 
        {
            "box": [
                0.3538011695906433, 
                0.4875, 
                0.0847953216374269, 
                0.25625
            ], 
            "puid": "Key_Chain", 
            "score": 0.7923935055732727, 
            "type": "Key_Chain"
        }
    ], 
    "detecttime": "1.822", 
    "get_image_time": "0.020", 
    "image_id": "135846_938112_3ba655f8-59b9-11e8-ab1a-00044ba51739", 
    "request_id": "3ba655f8-59b9-11e8-ab1a-00044ba51739", 
    "time": "1.843", 
    "ver": "2.2.11"
}

$ cd /etc/init.d
$ sudo touch start-detector
$ sudo chmod +x start-detector
$ sudo update-rc.d start-detector defaults
--- Content as below ---
#!/bin/sh
cd /home/nvidia/xray/release
sh run-detector.sh
------------------------

5. 安装proxychains4

5.1. Compile and install proxychains4

$ git clone https://github.com/rofl0r/proxychains
$ cd proxychains
$ git checkout v4.5
$ ./configure
$ make
$ sudo make install
$ sudo rm /usr/local/etc/proxychains.conf

5.2. Create the following config file in /etc/proxychains.conf

strict_chain
tcp_read_time_out 15000
tcp_connect_time_out 8000

localnet 127.0.0.0/255.0.0.0
localnet 10.0.0.0/255.0.0.0
localnet 192.168.0.0/255.255.0.0

[ProxyList]
socks5 127.0.0.1 1080

5.3. Test

$ proxychains4 wget http://www.google.com
$ proxychains4 curl ip.cn
$ proxychains4 bash
$ curl ip.cn
上一篇 下一篇

猜你喜欢

热点阅读