Hi,
For PyTorch, please use our prebuilt that has enabled the CUDA support.
For OpenCV, please build it from the source. Below is the script for your reference:
Thanks.