====== OpenAI Whisper ======
* https://developer.nvidia.com/embedded/learn/get-started-jetson-agx-orin-devkit
===== About Whisper =====
* https://openai.com/research/whisper
* https://github.com/openai/whisper
* https://towardsdatascience.com/transcribe-audio-files-with-openais-whisper-e973ae348aa7
* https://colab.research.google.com/github/petewarden/openai-whisper-webapp/blob/main/OpenAI_Whisper_ASR_Demo.ipynb
* https://huggingface.co/openai/whisper-base
* https://huggingface.co/openai/whisper-large-v2
===== Problems / Forums =====
* https://forums.developer.nvidia.com/t/jetpack-5-1-with-jetson-linux-35-2-1-released/240548
* https://forums.developer.nvidia.com/t/upgrade-to-jetpack-5-1-failed/242038/3
* https://forums.developer.nvidia.com/t/upgrade-to-jetpack-5-1-failed/242038
* https://forums.developer.nvidia.com/t/solution-dpkg-error-processing-package-nvidia-l4t-bootloader-configure/208627
===== Setup =====
==== 1. Upgrade to Jetpack 5.1 ====
This means basically a completely **new installation** / initial setup.
\\ Follow [[https://developer.nvidia.com/embedded/learn/get-started-jetson-agx-orin-devkit|Getting Started with Jetson AGX Orin Developer Kit]] to flash the Orin new.
\\ Use the [[https://developer.nvidia.com/drive/sdk-manager|NVIDIA SDK Manager]] to setup the Orin via USB from scratch.
==== 2. Install pip and virtualenv for Python3 ====
sudo apt install python3-pip
sudo apt install virtualenv
# as user upgrade pip
pip install --upgrade pip
==== 3. Install PyTorch for Jetson ====
:!: Follow {{https://docscontent.nvidia.com/dita/00000186-be6e-d774-adce-be7e84580000/deeplearning/frameworks/pdf/Install-PyTorch-Jetson-Platform.pdf|Install-PyTorch-Jetson-Platform.pdf}}
Alternative howto: https://docs.nvidia.com/deeplearning/frameworks/install-pytorch-jetson-platform/index.html
=== Prepare ===
sudo apt-get -y update
sudo apt-get -y install \
autoconf bc build-essential g++-8 gcc-8 clang-8 lld-8 gettext-base gfortran-8 \
iputils-ping libbz2-dev libc++-dev libcgal-dev libffi-dev libfreetype6-dev libhdf5-dev \
libjpeg-dev liblzma-dev libncurses5-dev libncursesw5-dev libpng-dev libreadline-dev libssl-dev \
libsqlite3-dev libxml2-dev libxslt-dev locales moreutils openssl python-openssl rsync scons \
python3-pip virtualenv libopenblas-dev
**Check for the latest version of PyTorch for Jetpack:** \\ https://developer.download.nvidia.com/compute/redist/jp/v51/pytorch/
Save the result in an environment variable:\\
export TORCH_INSTALL=https://developer.download.nvidia.com/compute/redist/jp/v51/pytorch/torch-1.14.0a0+44dac51c.nv23.02-cp38-cp38-linux_aarch64.whl
=== Install PyTorch in the environment nlp ===
# create and activate the environment nlp
virtualenv -p python3 nlp
source nlp/bin/activate
# pip install aiohttp numpy=='1.19.4' scipy=='1.5.3'
pip install aiohttp numpy scipy
export "LD_LIBRARY_PATH=/usr/lib/llvm-8/lib:$LD_LIBRARY_PATH"
pip install --upgrade protobuf;
pip install --no-cache $TORCH_INSTALL
=== Install Jupyterlab and Pandas ===
pip install pandas matplotlib jupyterlab
=== Install Whisper by OpenAI ===
pip install -U openai-whisper
=== In case you want to delete the installation: ===
deactivate
rm -Rf nlp
==== Test OpenAI Whisper ====
source nlp/bin/activate
pip install ipywidgets
pip install torchaudio
===== Not working: Upgrade to Jetpack 5.1, r35.2 =====
\\
**Bummer! This upgrade did not work! It was corrupt! \\
The Orin did not boot anymore! \\
Workaround: Use the [[https://developer.nvidia.com/drive/sdk-manager|NVIDIA SDK Manager]] to setup the Orin via USB from scratch!**
Install from NVIDIA Jetson Repository: https://repo.download.nvidia.com/jetson/
sudo bash -c 'echo "deb https://repo.download.nvidia.com/jetson/common r35.2 main" >> /etc/apt/sources.list.d/nvidia-l4t-apt-source.list'
sudo bash -c 'echo "deb https://repo.download.nvidia.com/jetson/t234 r35.2 main" >> /etc/apt/sources.list.d/nvidia-l4t-apt-source.list'
sudo apt update
sudo apt dist-upgrade
sudo apt install --fix-broken -o Dpkg::Options::="--force-overwrite"
root@agx-orin:/etc/apt/sources.list.d# apt list --upgradable
Listing... Done
jetson-gpio-common/stable 2.0.210ubuntu1 arm64 [upgradable from: 2.0.180ubuntu1]
libopencv-dev/stable 4.5.4-8-g3e4c170df4 arm64 [upgradable from: 4.2.0+dfsg-5]
nvidia-l4t-3d-core/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-apt-source/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-bootloader/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-camera/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-configs/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-core/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-cuda/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-display-kernel/stable 5.10.104-tegra-35.2.1-20230124153320 arm64 [upgradable from: 5.10.65-tegra-34.0.1-20220315011106]
nvidia-l4t-firmware/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-gputools/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-graphics-demos/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-gstreamer/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-init/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-initrd/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-jetson-io/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-kernel-dtbs/stable 5.10.104-tegra-35.2.1-20230124153320 arm64 [upgradable from: 5.10.65-tegra-34.0.1-20220315011106]
nvidia-l4t-kernel-headers/stable 5.10.104-tegra-35.2.1-20230124153320 arm64 [upgradable from: 5.10.65-tegra-34.0.1-20220315011106]
nvidia-l4t-kernel/stable 5.10.104-tegra-35.2.1-20230124153320 arm64 [upgradable from: 5.10.65-tegra-34.0.1-20220315011106]
nvidia-l4t-libvulkan/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-multimedia-utils/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-multimedia/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-nvfancontrol/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-nvpmodel-gui-tools/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-nvpmodel/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-nvsci/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-oem-config/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-optee/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-pva/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-tools/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-wayland/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-weston/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-x11/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
nvidia-l4t-xusb-firmware/stable 35.2.1-20230124153320 arm64 [upgradable from: 34.0.1-20220315011106]
python-jetson-gpio/stable 2.0.210ubuntu1 arm64 [upgradable from: 2.0.180ubuntu1]
python3-jetson-gpio/stable 2.0.210ubuntu1 arm64 [upgradable from: 2.0.180ubuntu1]
root@agx-orin:/etc/apt/sources.list.d#
Setting up nvidia-l4t-bootloader (35.2.1-20230124153320) ...
3701--0000--1--jetson-agx-orin-devkit-
Info. Active boot storage: mmcblk0
Info. Legacy mode: true
INFO. Dump nv_boot_control.conf:
TNSPEC 3701-500-0000-M.0-1-1-jetson-agx-orin-devkit-mmcblk0p1
COMPATIBLE_SPEC 3701--0000--1--jetson-agx-orin-devkit-
TEGRA_LEGACY_UPDATE true
TEGRA_BOOT_STORAGE mmcblk0
TEGRA_EMMC_ONLY false
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
Starting bootloader post-install procedure.
Starting legacy update procedure.
Update bl_only_payload completed.
Updating esp partition...
done.
Reboot the target system for changes to take effect.
Updating extlinux.conf...
Root device is set in the extlinux.conf
Setting up nvidia-l4t-nvsci (35.2.1-20230124153320) ...
Setting up nvidia-l4t-gputools (35.2.1-20230124153320) ...
Setting up nvidia-l4t-wayland (35.2.1-20230124153320) ...
Setting up jetson-gpio-common (2.0.210ubuntu1) ...
Setting up nvidia-l4t-xusb-firmware (35.2.1-20230124153320) ...
Setting up nvidia-l4t-cuda (35.2.1-20230124153320) ...
Setting up nvidia-l4t-optee (35.2.1-20230124153320) ...
Setting up nvidia-l4t-kernel (5.10.104-tegra-35.2.1-20230124153320) ...
Using the existing boot entry 'primary'
3701--0000--1--jetson-agx-orin-devkit-
Info. Active boot storage: mmcblk0
Info. Legacy mode: true
Starting kernel post-install procedure.
Starting legacy update procedure.
ERROR. Procedure for A_kernel-dtb update FAILED.
Cannot install package. Exiting...
dpkg: error processing package nvidia-l4t-kernel (--configure):
installed nvidia-l4t-kernel package post-installation script subprocess returned error exit status 1
Setting up nvidia-l4t-nvpmodel-gui-tools (35.2.1-20230124153320) ...
Setting up python-jetson-gpio (2.0.210ubuntu1) ...
Setting up nvidia-l4t-nvfancontrol (35.2.1-20230124153320) ...
Installing new version of config file /etc/nvpower/nvfancontrol/nvfancontrol_e3900.conf ...
Installing new version of config file /etc/nvpower/nvfancontrol/nvfancontrol_p2888.conf ...
Installing new version of config file /etc/nvpower/nvfancontrol/nvfancontrol_p3668.conf ...
Installing new version of config file /etc/nvpower/nvfancontrol/nvfancontrol_p3701_0000.conf ...
Installing new version of config file /etc/systemd/system/nvfancontrol.service ...
dpkg: dependency problems prevent configuration of nvidia-l4t-kernel-headers:
nvidia-l4t-kernel-headers depends on nvidia-l4t-kernel (= 5.10.104-tegra-35.2.1-20230124153320); however:
Package nvidia-l4t-kernel is not configured yet.
dpkg: error processing package nvidia-l4t-kernel-headers (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-jetson-io:
nvidia-l4t-jetson-io depends on nvidia-l4t-kernel (>> 5.10.104-tegra-35.2-0); however:
Package nvidia-l4t-kernel is not configured yet.
nvidia-l4t-jetson-io depends on nvidia-l4t-kernel (<< 5.10.104-tegra-35.3-0); however:
Package nvidia-l4t-kernel is not configured yet.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous
failure.
dpkg: error processing package nvidia-l4t-jetson-io (--configure):
dependency problems - leaving unconfigured
Setting up nvidia-l4t-x11 (35.2.1-20230124153320) ...
Installing new version of config file /etc/X11/xorg.conf.t194_ref ...
Setting up nvidia-l4t-3d-core (35.2.1-20230124153320) ...
Setting up python3-jetson-gpio (2.0.210ubuntu1) ...
dpkg: dependency problems prevent configuration of nvidia-l4t-display-kernel:
nvidia-l4t-display-kernel depends on nvidia-l4t-kernel (= 5.10.104-tegra-35.2.1-20230124153320); however:
Package nvidia-l4t-kernel is not configured yet.
dpkg: error processing package nvidia-l4t-display-kernel (--configure):
dependency problems - leaving unconfigured
Setting up nvidia-l4t-initrd (35.2.1-20230124153320) ...
No apport report written because MaxReports is reached already
Setting up nvidia-l4t-multimedia (35.2.1-20230124153320) ...
dpkg: dependency problems prevent configuration of nvidia-l4t-kernel-dtbs:
nvidia-l4t-kernel-dtbs depends on nvidia-l4t-kernel (= 5.10.104-tegra-35.2.1-20230124153320); however:
Package nvidia-l4t-kernel is not configured yet.
dpkg: error processing package nvidia-l4t-kernel-dtbs (--configure):
dependency problems - leaving unconfigured
Setting up nvidia-l4t-pva (35.2.1-20230124153320) ...
No apport report written because MaxReports is reached already
Setting up nvidia-l4t-gbm (35.2.1-20230124153320) ...
Setting up nvidia-l4t-camera (35.2.1-20230124153320) ...
Setting up nvidia-l4t-gstreamer (35.2.1-20230124153320) ...
Setting up nvidia-l4t-weston (35.2.1-20230124153320) ...
Setting up nvidia-l4t-graphics-demos (35.2.1-20230124153320) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Errors were encountered while processing:
nvidia-l4t-kernel
nvidia-l4t-kernel-headers
nvidia-l4t-jetson-io
nvidia-l4t-display-kernel
nvidia-l4t-kernel-dtbs
E: Sub-process /usr/bin/dpkg returned an error code (1)