Repository navigation
The first complete guide for deploying federated learning on the NVIDIA Jetson AGX Xavier
Jetson AGX Xavier Deployment Guide for Federated Learning via Flower Framework
Note
Please strictly follow the versions provided in this guide, as the Jetson Xavier platform has a unique hardware architecture. It requires specific versions of PyTorch and related packages. Note that the communication package grpcio may cause version conflicts with other deep-learning packages if mismatched.
- Jetson Xavier System Version:
Ubuntu 20.04.6 LTS with JetPack 5.1-b147 - Flower Package Version:
1.8.0 - PyTorch Version:
1.12.0a0 + 02fb0b0f.nv22.06 - Docker Image Version:
l4t-pytorch:r35.1.0-pth1.13-py3 - gRPC Version:
grpcio==1.62.1
Figure 1: NVIDIA Jetson AGX Xavier.
Let’s Start!!!
1. Prepare a Virtual Machine to Flash the AGX Xavier System
Note
The virtual machine should run Ubuntu 18.04.6 LTS, and the disk must have at least 70 GB of free space to download and flash the AGX Xavier system image.
There are many online tutorials for setting up virtual machines.
I recommend using VMware Workstation Pro 16 for its stability and ease of use.
Since this guide focuses primarily on flashing the AGX Xavier and preparing it for federated learning, the details of virtual machine configuration are omitted here — these setup steps are widely documented and do not involve many hidden pitfalls.
2. Flash the System for AGX Xavier
Figure 2. NVIDIA SDK Manager (version view). |
Figure 3. Platform selection in SDK Manager. |
Download SDK Manager sdkmanager_2.0.0-11402_amd64.deb and transfer the package to your virtual machine.
Install the package:
sudo apt install ./sdkmanager_2.0.0-11402_amd64.debLaunch SDK Manager (you should see a UI similar to Figure 3):
sdkmanagerWhen flashing begins, connect your host computer to the AGX Xavier via USB.
In SDK Manager, select JetPack 5.1 (rev. 1) for installation.
After the flashing process is complete, the AGX Xavier device will automatically power on and its display will light up — indicating that the system installation has finished successfully.
You can now proceed to the next step.
3. Expand the Storage Space on AGX Xavier
Note
By default, the AGX Xavier provides only 32 GB of onboard storage, which is insufficient for large datasets.
After completing the initial flashing process, it is recommended to expand the available storage by mounting and migrating the system to an external SSD.
Figure 4. Disk Utility App. |
Figure 5. Select SSD. |
Figure 6. Create a Disk Partition. |
First, open the Disks application (as shown in Figure 4).
Locate the installed SSD and select it (Figure 5).
Press Ctrl + D to format the SSD and prepare it for mounting.
💡 Note: The demonstration device used in this guide was already flashed and configured,
so the post-formatting screen is not displayed here.
Next, click the “+” button (Figure 6) to create a new partition, set a volume name, and then click Create.
To migrate the root filesystem from eMMC to the SSD, open a terminal within the SSD directory and run:
Figure 7. Setting up NVMe boot for AGX Xavier.
git clone https://github.com/jetsonhacks/rootOnNVMe.git
cd rootOnNVMe
./copy-rootfs-ssd.sh
./setup-service.shOnce all steps are complete, reboot the AGX Xavier to finalize the setup:
sudo reboot4. Let the Fan Spin Up ☺
Figure 8. Jtop graphical interface. |
Figure 9. Jtop graphical interface. |
To enable and monitor the fan on AGX Xavier, install jetson-stats:
sudo pip3 install --no-cache-dir -v -U jetson-statsIf an error occurs during installation or when starting jtop, check the service log:
journalctl -u jtop.service5. Set the Docker Environment for AGX Xavier
First, pull the NVIDIA PyTorch image (this step might take some time depending on your network speed):
sudo docker pull nvcr.io/nvidia/l4t-pytorch:r35.1.0-pth1.13-py3Then, run and open the container:
sudo docker run -it \
--shm-size=25g \
--runtime nvidia \
--name l4t-pth113 \
nvcr.io/nvidia/l4t-pytorch:r35.1.0-pth1.13-py3 \
/bin/bash
Figure 10. Docker terminal interface. |
Figure 11. File navigation inside Docker. |
Figure 12. Dataset storage location. |
After launching the container (Figure 10), navigate as shown in Figure 11 to access your filesystem.
Upload datasets or project files into the folder indicated in Figure 12:
Other Locations → Computer → var → lib → docker → overlay2 → [container-ID] → merged → root
Tip
The container’s internal files will reset when it restarts.
To preserve your environment, commit the current container to a new image.
For example, save it as flower:
sudo docker commit [original_container_ID] flowerNext time, you can open it with:
sudo docker run -it --shm-size=25g --runtime nvidia flower /bin/bash6. Install Flower Framework for Federated Learning
Now install the Flower framework in the Docker environment:
pip3 install scikit-learn
pip3 install matplotlib
pip3 install numpyThen:
pip3 install flwr==1.8.0Then:
pip3 install --no-cache-dir --force-reinstall -Iv grpcio==1.62.1Now, all conditions are prepared. Thanks for following! ❤









