Synopsis
To whom needs GPU version of Torchvision running on NVIDIA Jetson. - Cannot simply install torchvision by pip.
Prerequisite checklist
- Check model of embedded board
- Prepare a virtual python environment (e.g., miniforge3), it’s not suggested to follow NVIDIA official version of guideline to install code by sudo (which may mess up system python environments).
- Check pre-built binary files on Jetson binaries, if there are some appropriate prebuilt wheels, then download them. Make sure to rename them into the formate like “ torch-1.10.0-cp36-cp36m-linux_aarch64.whl”.
- Install PyTorch via this blog.
- Query Torchvision version compatible with current PyTorch version.
Install by source code
Refer to this blog from NVIDIA forum
After installing PyTorch by wheels from NVIDIA, then install torchvision by source code to avoid compatibility issues.
1 | sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev libopenblas-dev libavcodec-dev libavformat-dev libswscale-dev |