You can set the versions of Python that jetson-inference looks for when building the bindings here:
- https://github.com/dusty-nv/jetson-inference/blob/44c7661dfbb97018fbc4651fa4608d5491d3f39e/python/CMakeLists.txt#L11
- https://github.com/dusty-nv/jetson-utils/blob/f0bff5c502f9ac6b10aa2912f1324797df94bc2d/python/CMakeLists.txt#L11
You can install Python 3.6 wheels for PyTorch from: PyTorch for Jetson
Just pick one for JetPack 4 (up to PyTorch 1.10) and use the right version of pip when installing it
See here for running the jetson-inference docker container: https://github.com/dusty-nv/jetson-inference/blob/master/docs/aux-docker.md