Installing PyTorch & Torchvision on NVIDIA’s Jetson TX2
A Quick Installation Guide
Working on a recent deep learning project on top of a Jetson TX2, I attempted to install the latest version of the Fast.ai library only to hit a wall, due to challenges with installing PyTorch (a pre-requisite install for Fast.ai). After checking out some forums, I managed to get everything to play nice within a virtual environment. For those out there who would like to use torch and Torchvision on some type of aarch64 device, this guide’s for you!
Environment
Make sure you have this environment setup, otherwise reach out in the comments and I’ll try to help if you run into issues related to a particular environment setting:
- Python3.6+(python3-pip)
- pip3
- Ubuntu 18.04.3
- Jetson TX2
- Jetpack 4.2.1+
Setting Up a Virtual Environment
To keep things contained, I opted for configuring a virtual environment. Usually, I’d go with miniconda3 because it has most popular data science libraries pre-installed but Jetsons do not support conda as of now. Nevertheless, virtualenv worked out just fine in the end: