---
# System prepended metadata

title: AGX Orin安裝步驟與使用方式

---

# Jetson AGX Orin安裝與使用說明
AGX Orin相關事項，包含sdkmanager, flash machine, pytorch, anaconda

## SDK Manager
1. 進入 https://developer.nvidia.com/sdk-manager
    ![image](https://hackmd.io/_uploads/H1JdZtMIel.png)
    選擇對應的ubuntu版本deb檔並下載 (recommand 22.04)
    sudo apt update & sudo apt upgrade
    sudo dpkg -i sdkmanager_[version]-[build#].deb (更換你的deb檔)
    開啟sdk manager
    
2. 燒錄OS、FW、CUDA
    https://docs.nvidia.com/sdk-manager/install-with-sdkm-jetson/index.html
    
## AGX Orin安裝注意事項
* **Recommand**
    **最好使用Ubuntu 22.04安裝Jetpack 6**，可省pytorch、numpy等套件相依性麻煩
    **Ubuntu 24.04安裝Jetpack 6.1**，參考v6.1 pytorch安裝

* Automatically Setup (通常)
    ![image](https://hackmd.io/_uploads/S1AX4NQ8xx.png)
    一般來說都先以自動安裝優先，device選擇Jetson AGX Orin Developer Kit，IPv4不動，儲存設備選擇NVMe (SSD)

* 若發生 "Cannot connect to the device via SSH...."
    ![image](https://hackmd.io/_uploads/S1PqrV7Uee.png)

* 解決方法 (Manaully Setup)
    ![image](https://hackmd.io/_uploads/rJId8VQLee.png)
    
    1. 進到recovery mode
    2. 根據步驟4-6，先按住中間按鈕(force recovery)再按住左邊按鈕(power)，然後放開
    3. 看到Flash亮即可重新安裝
    4. (最終手段) 先進到AGX Orin裡面，通常已安裝完linux系統跟核心，再回來原本的電腦繼續使用Automatically Setup

## Firefox安裝
Firefox with arm64 CPU installation: https://support.mozilla.org/zh-TW/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions
![image](https://hackmd.io/_uploads/Hk8ZHYz8le.png)

下載firefox shell檔: https://drive.google.com/file/d/1H9hQ9nV1-6QVbsOnUogGr_8vgKWaKt9d/view?usp=sharing
在terminal執行"bash firefox.sh"

## Miniconda安裝
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh
bash Miniconda3-latest-Linux-aarch64.sh (設定都選yes即可)
source ~/miniconda3/bin/activate (activate conda)
conda init (set base env as default automatically)
conda --version (檢查conda是否正常安裝與設定環境變數)

下載miniconda shell檔: https://drive.google.com/file/d/10mXJWTn8d8KIq_a7TJzgbVg8LylAX11t/view?usp=sharing
在terminal執行"bash miniconda.sh"

## 設定Conda環境變數 (若沒成功設定環境變數)
nano ~/.bashrc
"add this to env variable for activating conda base env"
![Screenshot from 2025-07-15 19-04-57](https://hackmd.io/_uploads/rynJLh7Ueg.png)
source ~/.bashrc
conda --version

## Conda使用方式
* 介紹
    可以互相隔離每個環境，不受相依套件干擾，還能方便管理目前安裝的套件

* 建立虛擬環境
    create -n "env_name" python="py_version"
    
* 啟動虛擬環境
    conda activate "env_name"
    
* 退出虛擬環境
    conda deactivate

* 環境列表
    conda env list

* 刪除虛擬環境
    conda deactivate
    conda remove -n "env_name" --all

* 複製虛擬環境
    conda create -n "env_clone" --clone "env_name"
    
## 安裝Pytorch & Torchvision
* pytorch, torchvision & torchaudio for Jetpack 6
    torch v6 shell檔: https://drive.google.com/file/d/1XqySDv54N24NB71tNWBHODOQCqBYdLj4/view?usp=drive_link
    在terminal執行"bash torch_v6.sh"
    
* pytorch for Jetpack 6.1
    torch v6.1 shell檔: https://drive.google.com/file/d/13Xv7u99QGlCohu8kcAdCCesrCWhf-pg4/view?usp=drive_link
    在terminal執行"bash torch_v61.sh"
    
    ref: https://forums.developer.nvidia.com/t/jetpack-6-1-cuda-12-6-support-cusparselt-pytorch-installation/310222
    
    
* pytorch multiple version
    v6 & down: https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048
    All: https://developer.download.nvidia.com/compute/redist/jp/
    Jetpack version compatibility: https://docs.nvidia.com/deeplearning/frameworks/install-pytorch-jetson-platform-release-notes/pytorch-jetson-rel.html