# Using Jetson AGX Orin with Provided Ubuntu 20.04 System

We broadly follow these instructions:

{% embed url="<https://developer.nvidia.com/embedded/learn/get-started-jetson-agx-orin-devkit>" %}

{% embed url="<https://developer.nvidia.com/embedded/learn/jetson-agx-orin-devkit-user-guide/developer_kit_layout.html>" %}

{% embed url="<https://docs.nvidia.com/jetson/archives/r36.4/DeveloperGuide/IN/QuickStart.html>" %}

## Power Up

Connect USB keyboard and mouse, DisplayPort port, and USB Type-C power cable

<figure><img src="https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2FeOXvVASEZrLuGIA16kO3%2F1000005996.jpg?alt=media&#x26;token=ab61f1f2-ad78-42a2-963e-682283469e96" alt=""><figcaption></figcaption></figure>

## Install Jetpack Tools

First, use this command to check board support package (BSP) version

```bash
cat /etc/nv_tegra_release
```

As seen in the output, the BSP is up-to-date, the apt sources lists are the latest, and we can proceed

<figure><img src="https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2FBR3LMSkioC8uLmjyH6BX%2FScreenshot%20from%202023-03-15%2008-08-56.png?alt=media&#x26;token=b15ca847-5824-4a6c-ad9d-b4b115d0d867" alt=""><figcaption></figcaption></figure>

Run the commands to install Jetpack

```bash
sudo apt update
sudo apt dist-upgrade
sudo reboot
sudo apt install nvidia-jetpack
```

Add the following lines to \~/.bashrc

{% code title=".bashrc" %}

```bash
...

# CUDA
export PATH="/usr/local/cuda/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"

...
```

{% endcode %}

Now it should detect CUDA

```bash
nvcc --version
```

<figure><img src="https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2FeGlC0T0h1KLHyCLNMjZP%2FScreenshot%20from%202024-11-05%2017-09-10.png?alt=media&#x26;token=5edca578-f06c-4469-b583-2d42f0161526" alt=""><figcaption></figcaption></figure>

## Install PyTorch

Install conda according to the "Install Conda" section in this guide

{% content-ref url="../../risc-v-soc/quick-start-with-chipyard-on-ubuntu-or-wsl" %}
[quick-start-with-chipyard-on-ubuntu-or-wsl](https://tk233.gitbook.io/notes/risc-v-soc/quick-start-with-chipyard-on-ubuntu-or-wsl)
{% endcontent-ref %}

```bash
conda create -yn tensorrt python=3.10
```

{% code overflow="wrap" %}

```bash
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
```

{% endcode %}
