I have tried to install Jetson and I have a previos post about flashing Orin. It seems that after installation the Cuda libraries are installed. The board is not recognized by Jetson-Stats. Is it possible to get a good description of how to install Cuda on Orin so that the versions match? I have installed (according to sdk-manager) the latest 5.0.1 DP version of the OS. It also seems in sdk-manager that I have CUDA etc installed.
See attached image.
So. I am on the right track. The Pytorch must be the latest.
Upgrading the pytorch to 1.12.0a0+84d1cb9.nv22.4’ By following parts of
(This upgrades protobuf so it needs to be downgraded)
Then downgrading protobuf to:
pip3 install --upgrade protobuf==3.19.4
What happens now is that there is a collision in packages between Pytorch and torchvision.
So. Now There must be a way of getting pytorch 1.12 to work with torchvision…
Blockquote
Traceback (most recent call last):
File “detect.py”, line 252, in
main(opt)
File “detect.py”, line 247, in main
run(**vars(opt))
File “/home/aiadmin/.local/lib/python3.8/site-packages/torch/autograd/grad_mode.py”, line 27, in decorate_context
return func(*args, **kwargs)
File “detect.py”, line 127, in run
pred = non_max_suppression(pred, conf_thres, iou_thres, classes, agnostic_nms, max_det=max_det)
File “/home/aiadmin/Development/yolov5/utils/general.py”, line 859, in non_max_suppression
i = torchvision.ops.nms(boxes, scores, iou_thres) # NMS
File “/home/aiadmin/.local/lib/python3.8/site-packages/torchvision/ops/boxes.py”, line 34, in nms
_assert_has_ops()
File “/home/aiadmin/.local/lib/python3.8/site-packages/torchvision/extension.py”, line 62, in _assert_has_ops
raise RuntimeError(
RuntimeError: Couldn’t load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible, or if you had errors while compiling torchvision from source. For further information on the compatible versions, check GitHub - pytorch/vision: Datasets, Transforms and Models specific to Computer Vision for the compatibility matrix. Please check your PyTorch version with torch.version and your torchvision version with torchvision.version and verify if they are compatible, and if not please reinstall torchvision so that it matches your PyTorch install.
Anyone getting Orin to work with pytorch and torchvision?
This generates the problem with lastest cuda in 5.0.1 DP:
Pytorch: 1.12.0a0+84d1cb9.nv22.4
Torchvision: 0.12.0
Blockquote
import torchvision
/home/aiadmin/.local/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:
warn(f"Failed to load image Python extension: {e}")
Changing torchvision to 0.10.0 it does not complain on import but the
Blockquote
Adding AutoShape…
Traceback (most recent call last):
File “run.py”, line 8, in
results = model(img)
File “/home/aiadmin/.local/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 1111, in _call_impl
return forward_call(*input, **kwargs)
File “/home/aiadmin/.local/lib/python3.8/site-packages/torch/autograd/grad_mode.py”, line 27, in decorate_context
return func(*args, **kwargs)
File “/home/aiadmin/.cache/torch/hub/ultralytics_yolov5_master/models/common.py”, line 606, in forward
y = non_max_suppression(y if self.dmb else y[0],
File “/home/aiadmin/.cache/torch/hub/ultralytics_yolov5_master/utils/general.py”, line 859, in non_max_suppression
i = torchvision.ops.nms(boxes, scores, iou_thres) # NMS
File “/home/aiadmin/.local/lib/python3.8/site-packages/torchvision/ops/boxes.py”, line 34, in nms
_assert_has_ops()
File “/home/aiadmin/.local/lib/python3.8/site-packages/torchvision/extension.py”, line 62, in _assert_has_ops
raise RuntimeError(
RuntimeError: Couldn’t load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible, or if you had errors while compiling torchvision from source. For further information on the compatible versions, check GitHub - pytorch/vision: Datasets, Transforms and Models specific to Computer Vision for the compatibility matrix. Please check your PyTorch version with torch.version and your torchvision version with torchvision.version and verify if they are compatible, and if not please reinstall torchvision so that it matches your PyTorch install.
Hi @magnus.gabell, at this point with the various packages that you have tried and installed and the unknown state of your environment, I would recommend seeing if you still encounter this issue when trying the l4t-pytorch container, which already comes with PyTorch and torchvision pre-installed:
Hi, Thanks Dusty, That worked. I checked the versions of all components and noticed that there were residual old version of pytorch. After uninstalling them and verifying the local build of the latest branch of torchvision, I managed to get it running. So now I have it running outside of docker. It was really helpful to check the container for correctness and compare.