# Jetson AGX Xavier 系統環境設定1_在windows10環境連接與安裝 ###### tags: `Edge AI` `Nvidia` `Jetson` `AGX Xavier` `System Setup`  ## NVIDIA Jetson 平台佈署相關筆記 ### 基本環境設定 - [Jetson AGX Xavier 系統環境設定1_在windows10環境連接與安裝](https://hackmd.io/@YungHuiHsu/HJ2lcU4Rj) - [Jetson AGX Xavier 系統環境設定2_Docker安裝或從源程式碼編譯](https://hackmd.io/k-lnDTxVQDWo_V13WEnfOg) - [NVIDIA Container Toolkit 安裝筆記](https://hackmd.io/wADvyemZRDOeEduJXA9X7g) - [Jetson 邊緣裝置查詢系統性能指令jtop](https://hackmd.io/VXXV3T5GRIKi6ap8SkR-tg) - [Jetson Network Setup 網路設定](https://hackmd.io/WiqAB7pLSpm2863N2ISGXQ) - [OpenCV turns on cuda acceleration in Nvidia Jetson platform<br>OpenCV在Nvidia Jetson平台開啟cuda加速](https://hackmd.io/6IloyiWMQ_qbIpIE_c_1GA) ### 模型佈署與加速 - [[Object Detection_YOLO] YOLOv7 論文筆記](https://hackmd.io/xhLeIsoSToW0jL61QRWDcQ) - [Deploy YOLOv7 on Nvidia Jetson](https://hackmd.io/kZftj6AgQmWJsbXsswIwEQ) - [Convert PyTorch model to TensorRT for 3-6x speedup<br>將PyTorch模型轉換為TensorRT,實現3-6倍加速](https://hackmd.io/_oaJhYNqTvyL_h01X1Fdmw?both) - [Accelerate multi-streaming cameras with DeepStream and deploy YOLO series models<br>使用DeepStream加速多串流攝影機並佈署佈署YOLO系列模型](https://hackmd.io/@YungHuiHsu/rJKx-tv4h) - [Use Deepstream python API to extract the model output tensor and customize model post-processing (e.g., YOLO-Pose)<br>使用Deepstream python API提取模型輸出張量並定製模型后處理(如:YOLO-Pose)](https://hackmd.io/@YungHuiHsu/rk41ISKY2) - [Model Quantization Note 模型量化筆記](https://hackmd.io/riYLcrp1RuKHpVI22oEAXA) --- # Nvidia官方導覽文件[Hello AI World](https://github.com/dusty-nv/jetson-inference) 內含手把手教學 - 中文介紹 [Hello AI World (一):環境準備與安裝](https://ithelp.ithome.com.tw/articles/10299233?sc=rss.iron) --- 以下是使用公司筆電的windows系統,在鎖隨身碟、沒有無線網卡、無法接網路線的艱困環境下的環境設置紀錄。 可以的話,直接自組配一個Linux系統或是筆電透過SSD外接Linux環境可以簡化操作步驟 ## Document - 官方文件入口網站[Autonomous Machines/Learn/Getting Started](https://developer.nvidia.com/embedded/learn/getting-started-jetson) - JETSON AGX XAVIER使用手冊 - [JETSON AGX XAVIER DEVELOPER KIT_User Guide](https://developer.nvidia.com/embedded/downloads#?search=Jetson%20AGX%20Xavier%20Developer%20Kit%20User%20Guide) - NVIDIA Developer 的教學短片 - [NVIDIA Jetson AGX Xavier Developer Kit Initial Setup](https://www.youtube.com/watch?v=-nX8eD7FusQ) ## 硬體外觀 |  |  |  | |:------------------------------------------:| ------------------------------------------ |:------------------------------------------:|   - 面對開關左側的USB type C 記得要空下來連接筆電做系統更新用 - J512 can be used to flash the developer kit. - 用J512這個位置的USB連接 Ubuntu Linux x64 18.04 或 16.04 以上的電腦 - 參閱[NVIDIA SDK Manager Documentation](https://docs.nvidia.com/sdk-manager/download-run-sdkm/index.html) ## 連接PC/NB - 使用USBA3.0 轉type C的線與筆電連接  - 如果有順利的話(記得要連結在裝置前端J512那個接口,而且確認是USB3.0的線) - 到控制台確認是否有正確抓到裝置  ## 系統設定[Setting up Jetson with JetPack](https://github.com/dusty-nv/jetson-inference/blob/master/docs/jetpack-setup-2.md) Jeston主機已經有內建Ubuntu環境,如果要重新安裝的話,需要一台Ubuntu環境的Host主機執行Nvidia SDK Manager來進行重刷機 - 可以在windows 系統安裝Ubuntu虛擬機執行 - 需使用 VMWare - [Virtual Box 在usb裝置通訊上有問題](https://forums.developer.nvidia.com/t/flash-jetson-nano-os-stuck-at-99-9/73065) - ==在 AGX Xavier安裝JetPack 5.0 在外接裝置上有相容性問題== - [Jetson AGX Xavier Developer Kit: Tips and Tricks to Save You Time and Sanity](https://dalegi.com/2022/07/27/jetson-agx-xavier-developer-kit-tips-and-tricks-to-save-you-time-and-sanity/) - 個人測試JetPack 5.1可抓到外接隨身碟、羅技外接攝影機正常運作 - 另一個問題是,JetPack 5.1安裝在32G的儲存空間後只剩6G不到的可用空間,L4T R35.x對應的Docker Linux 檔案(L4T R34.x以後)也太過肥大,會導致無法使用container,可考慮以下解法 - 直接把系統安裝在外接的usb隨身碟上,建議至少64G(~~SD卡官方論壇說不支援~~) - [AGX Xavier安裝系統在sd卡上成功紀錄](https://hankliao.medium.com/nvidia-jetson-agx-xavier-%E5%95%9F%E5%8B%95-%E7%87%92%E6%A9%9F%E6%95%99%E5%AD%B8-b21339550f06) - 或著都不開doker直接用源碼編譯 - 或安裝JetPack 4.6版(L4T R32.x)節省儲存空間 ### NVIDIA JetPack SDK9 工具安裝 略... - [Jetson AGX Xavier Developer Kit: Tips and Tricks to Save You Time and Sanity](https://dalegi.com/2022/07/27/jetson-agx-xavier-developer-kit-tips-and-tricks-to-save-you-time-and-sanity/) #### 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中的說明 :::spoiler > ### 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"  - 至Remote NDIS(我這邊的顯示名稱是"乙太網路2") `IPv4`手動設置靜態ip位址`192.168.55.100`  - 在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位址,因為很好記所以用他)檢查是否有正確開啟網路共用設定 - 成功的話會看到像這樣  :::warning 網路連線不穩定、非常慢 ::: #### 網路解決方案 - 獨立連接網路 ##### 網路線方案 申請開通公司MAC address的連線權限,以網路線連接插座 網路相關設定見 [Jetson Network Setup](https://hackmd.io/@YungHuiHsu/HyQJdNxx2) ## 操作_透過PC/NB ### 使用指令模式連線_putty ### 使用圖形介面通過網路連線 #### 安裝 VNC Server 在Jetson裝置(Linux for Tegra system)安裝VNC server後,可以允許透過網路訪問、並以圖形介面操作。 以下依照官方文件檔"README-vnc.txt"執行或參考[Autonomous/MachinesLearn/Tutorials/Setting Up VNC](https://developer.nvidia.com/embedded/learn/tutorials/vnc-setup) #### 安裝 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 - [noVNC](https://github.com/novnc/noVNC) - [流暢的linux桌面連線體驗(noVNC)](https://ithelp.ithome.com.tw/articles/10190191) - [nano安装noVNC实现webVNC](https://blog.csdn.net/wgqabc/article/details/123598530) Not yet test... #### 暫時性解決方案 - 用Flask建立串流傳送桌面畫面 - 區網內OpenCV + Flask 快速搭建簡易的影像串流 server - [KodingWork/raspberry_pi/video_streaming_with_opencv_flask/](https://github.com/Jim-Chang/KodingWork/tree/master/raspberry_pi/video_streaming_with_opencv_flask) --- 環境安裝好後,接下來進入程式編譯的部分 使用 [jetson-stats 套件](https://hackmd.io/@YungHuiHsu/H1kx5WdJn)檢視系統狀態  --- ## 參考資料 - [NVIDIA JETSON AGX XAVIER試玩-範例篇](https://pondahai.medium.com/nvidia-jetson-agx-xavier%E8%A9%A6%E7%8E%A9-%E7%AF%84%E4%BE%8B%E7%AF%87-c48a7a4bbeac) - [NVIDIA Jetson AGX Xavier Developer kit 開箱開機!](https://blog.cavedu.com/2019/03/13/nvidia-jetson-xavier/) #### 遠端圖形界面設定VNC - [Nvidia AGX Xavier/Jetson Nano遠端登入remote by VNC](https://hollyqood.wordpress.com/2019/04/25/nvidia-agx-xavier%E9%81%A0%E7%AB%AF%E7%99%BB%E5%85%A5remote-by-vnc%E6%8C%89%E5%9C%96%E6%96%BD%E5%B7%A5%E4%BF%9D%E8%AD%89%E6%88%90%E5%8A%9F%E7%89%88%E6%9C%AC/)
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.