Try   HackMD

Jetson AGX Xavier 系統環境設定1_在windows10環境連接與安裝

tags: Edge AI Nvidia Jetson AGX Xavier System Setup

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

NVIDIA Jetson 平台佈署相關筆記

基本環境設定

模型佈署與加速


Nvidia官方導覽文件Hello AI World

內含手把手教學


以下是使用公司筆電的windows系統,在鎖隨身碟、沒有無線網卡、無法接網路線的艱困環境下的環境設置紀錄。

可以的話,直接自組配一個Linux系統或是筆電透過SSD外接Linux環境可以簡化操作步驟

Document

硬體外觀

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

  • 面對開關左側的USB type C 記得要空下來連接筆電做系統更新用
    • J512 can be used to flash the developer kit.
  • 用J512這個位置的USB連接 Ubuntu Linux x64 18.04 或 16.04 以上的電腦

連接PC/NB

  • 使用USBA3.0 轉type C的線與筆電連接

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    • 如果有順利的話(記得要連結在裝置前端J512那個接口,而且確認是USB3.0的線)
      • 到控制台確認是否有正確抓到裝置
        Image Not Showing Possible Reasons
        • The image file may be corrupted
        • The server hosting the image is unavailable
        • The image path is incorrect
        • The image format is not supported
        Learn More →

系統設定Setting up Jetson with JetPack

Jeston主機已經有內建Ubuntu環境,如果要重新安裝的話,需要一台Ubuntu環境的Host主機執行Nvidia SDK Manager來進行重刷機

NVIDIA JetPack SDK9 工具安裝

NVIDIA JetPack SDK9 與系統安裝後,有兩種方式使用裝置

  1. 直接在邊緣裝置上操作

    • 直接接鍵盤、滑鼠、顯示器、網路
  2. 連結筆電/PC
    原本以為只能在LINUX系統使用,後來發現windows系統也可以,在L4T-README/README-usb-dev-mode.txt 有提到windws系統設定方法

操作_直接在邊緣裝置上操作

由於公司沒配無線藍芽接收器、外部的機台沒申請也無法接線,這邊採取的做法是透過USB連接到筆電的方式取得網路

  • 將公司筆電以安全模式進入,先抓取L4T-README目錄內的文件檔
    這邊提到RNDIS USB Ethernet device會自動安裝,但公司筆電可能因為隨身碟讀取被沒有進展到這一步,USB設定見下列文件說明

共用網路設定

官方文件L4T-README/README-usb-dev-mode.txt中的說明

Using Ethernet Protocol

An RNDIS USB Ethernet device is created, and the required driver is
automatically installed. You can safely ignore the message that the NCM device
is unknown. Depending on the Windows version you have, you might need to
disable the NCM device.

To configure your host as a gateway for Jetson:

  1. Click Control Panel -> Network and Internet -> Network Connections.

  2. Edit the "Remote NDIS Compatible Device" interface and configure "Property".

  3. Ensure that the IP address is 192.168.55.100. If Windows always gives you
    another IP address, for example, 192.168.137, you might need to configure a
    static IP address.

  4. Click Control Panel -> Network and Internet -> Network Connections.

  5. Edit the interface of your public interface and configure "Property".

  6. On the Sharing tab, enable the "Allow other network users to connect through
    this computer's internet connection" option.

  7. In the "Home networking connection" menu, select the RNDIS interface.

共用網路設定步驟

  • Control Panel -> Network and Internet -> Network Connections選取筆電的WIFI共用設定
    • 勾選允許共用設定,並在家用網路連線選取RNDIS interface,我這邊的顯示名稱為"乙太網路2"
      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →
    • 至Remote NDIS(我這邊的顯示名稱是"乙太網路2") IPv4手動設置靜態ip位址192.168.55.100
      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →
    • 在windows 的powershell以ssh連線ssh username@192.168.55.1 登入
      • 參考文件給Jetson的預設ip設定"Linux for Tegra assigns a static IPv4 address of 192.168.55.1 to Jetson"
    • ping 8.8.8.8 (8.8.8.8是google的DNS伺服器IP位址,因為很好記所以用他)檢查是否有正確開啟網路共用設定
    • 成功的話會看到像這樣
      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →

網路連線不穩定、非常慢

網路解決方案 - 獨立連接網路

網路線方案

申請開通公司MAC address的連線權限,以網路線連接插座
網路相關設定見 Jetson Network Setup

操作_透過PC/NB

使用指令模式連線_putty

使用圖形介面通過網路連線

安裝 VNC Server

在Jetson裝置(Linux for Tegra system)安裝VNC server後,可以允許透過網路訪問、並以圖形介面操作。

以下依照官方文件檔"README-vnc.txt"執行或參考Autonomous/MachinesLearn/Tutorials/Setting Up VNC

安裝 VNC Server

開啟或遠端連線(ssh)Jetson裝置terminal

sudo apt update
sudo apt install vino

啟用 VNC Server

  • 啟用VNC Server,在每次登錄時啟動
mkdir -p ~/.config/autostart
cp /usr/share/applications/vino-server.desktop ~/.config/autostart
  • 設定 VNC server
gsettings set org.gnome.Vino prompt-enabled false
gsettings set org.gnome.Vino require-encryption false
  • 設定個人密碼
gsettings set org.gnome.Vino authentication-methods "['vnc']"
gsettings set org.gnome.Vino vnc-password $(echo -n 'thepassword'|base64)
  • 重開機讓設定生效
sudo reboot

連線到 VNC server

Nvidia Suggested, but failed

第1步:選擇想要的VNC瀏覽器安裝
第2步:啟動VNC瀏覽器,並鍵入你的開發工具包的IP地址。在裝置上以ifconfig查詢。預設是"192.168.55.1"
第3步:如果你已經配置了VNC服務器的認證,提供VNC密碼

  • Anydesk also failed
    由於公司筆電與網域鎖VNC軟體但可以安裝Anydesk,因此改為嘗試在Jetson也裝Anydesk。
    • 在jetson 上嘗試安裝ARM架構版本,從 Raspberry Pi 環境的頁面下載wget https://download.anydesk.com/rpi/anydesk_6.1.1-1_armhf.deb
    • sudo dpkg -i anydesk_6.1.1-1_armhf.deb安裝後無法啟動
noVNC: HTML VNC Client Library and Application

暫時性解決方案 - 用Flask建立串流傳送桌面畫面


環境安裝好後,接下來進入程式編譯的部分

使用 jetson-stats 套件檢視系統狀態


參考資料

遠端圖形界面設定VNC