PSA: Building a ML Research Image for the Nano

I’ve enjoyed exploring the Jetson Nano’s potential as an inexpensive tool for ML projects. What I haven’t enjoyed as much has been tracking down dependencies, conflicts, etc. for my favorite packages. So, in an effort to save everyone some time and trouble, here is a process I’ve found works well to create an up-to-date image with:

  • JetPack 4.2.2
  • The JetCard add-ons:
    • PyTorch
    • TensorFlow
    • Jupyter Lab Server
  • SciPy
  • Keras
  • Seaborn
  • Scikit-image
  • Scikit-learn
    and their associated dependencies (e.g. NumPy, Matplotlib, Pandas)

First, download the Jetson Nano JetPack 4.2.2 image at:

and install and configure it on your Nano, with either WiFi or Ethernet internet access.

Next, open a terminal - here is the sequence of commands to install everything:

sudo apt-get update
git clone -b jetpack_4.2.1 --single-branch GitHub - NVIDIA-AI-IOT/jetcard: An SD card image for web programming AI projects with NVIDIA Jetson Nano
cd jetcard
./install.sh my_jetson_password
sudo apt-get install -y libatlas-base-dev gfortran
sudo pip3 install scipy
sudo pip3 install keras
sudo pip3 install seaborn
sudo pip3 install scikit-image
sudo pip3 install scikit-learn

Each install will take some time, so you’ll want to have a cup or two (or pot or two) of coffee handy while you do this.

After you’re done, you can test things by opening a Jupyter notebook at http://my_jetson_ip_address:8888 and running some code.

One last tip: since memory is so constrained on the Nano, you may find it a good idea to follow the following procedure before running any memory-intensive code:

  • Reboot the Nano;
  • Log in via ssh;
  • Type in the following command to unload the graphic shell, and free up memory for your code:
    sudo systemctl isolate multi-user.target

Hi,

Thanks for summarizing the installation steps.
It’s good to know it works fine on your environment : )

Than you!

Confirm working on my nano as well.

I had some trouble getting scikit installer to work and this just makes it alot easier.

May I suggest you add jetson-stats, very useful tool to see both cpu and gpu load in a terminal.

sudo -H pip install jetson-stats