Docker container with opencv and PyTorch?

Hey could anyone please link me to a docker container for arm64 which has both opencv for python and pytorch?

Hi,

Please try l4t-pytorch or l4t-ml with pyTorch pre-installed.
Then OpenCV can be installed via apt-get directly.

For example:

$ sudo docker run -it --rm --runtime nvidia --network host nvcr.io/nvidia/l4t-pytorch:r32.4.3-pth1.6-py3
# apt-get update
# apt-get install python3-opencv

Thanks.

I tried this but when running this or any code with OpenCV:

import cv2
print (cv2.__version__)

python3 -c "import cv2; print(cv2.__version__)"

It gives me the following error:

Illegal instruction (core dumped)

Hi TheDoctor,

Please help to open a new topic for your issue. Thanks

Can you tell me the numpy version you are using?
There seem to be an issue with 1.19.5.
I installed 1.19.4 and can now import CV2

1 Like

Had the same issue when compiled & build opencv 4.5.1 .

Don’t know how numpy got updated to 1.19.5. But reinstalling numpy 1.19.4 worked.

Saved my day !!

Thanks !