Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Torch == 2.5.1 with Cuda + torchvision can't be used with opencv #8834

Open
lordsoffallen opened this issue Dec 27, 2024 · 0 comments
Open

Comments

@lordsoffallen
Copy link

lordsoffallen commented Dec 27, 2024

🐛 Describe the bug

torchvision 0.20.0 and 0.20.1 has a requirement of ffmpeg to be >=4.4.2, <5.0.0 which is not compatible with opencv as opencv requires higher versions which creates environment conflict and in turn results in downgrading pytorch to 2.4.0 and torchvision to 0.19.0.

Here is a full preview of installation plan:

Channels:
 - nvidia
 - pytorch
 - conda-forge
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/ftopal/miniconda3/envs/projx-gpu

  added / updated specs:
    - opencv


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ffmpeg-7.1.0               | gpl_h4c12d27_707         9.9 MB  conda-forge
    gdk-pixbuf-2.42.12         |       hb9ae30d_0         516 KB  conda-forge
    hdf5-1.14.4                |nompi_h2d575fe_105         3.8 MB  conda-forge
    libgfortran-14.2.0         |       h69a702a_1          53 KB  conda-forge
    libgfortran5-14.2.0        |       hd5240d6_1         1.4 MB  conda-forge
    libglu-9.0.3               |       h03adeef_0         318 KB  conda-forge
    libhwloc-2.11.2            |default_h0d58e46_1001         2.3 MB  conda-forge
    libopencv-4.10.0           |qt6_py310h0bc352f_613        29.5 MB  conda-forge
    libopenvino-2024.5.0       |       hac27bb2_0         5.3 MB  conda-forge
    libopenvino-auto-batch-plugin-2024.5.0|       h4d9b6c2_0         108 KB  conda-forge
    libopenvino-auto-plugin-2024.5.0|       h4d9b6c2_0         232 KB  conda-forge
    libopenvino-hetero-plugin-2024.5.0|       h3f63f65_0         192 KB  conda-forge
    libopenvino-intel-cpu-plugin-2024.5.0|       hac27bb2_0        11.7 MB  conda-forge
    libopenvino-intel-gpu-plugin-2024.5.0|       hac27bb2_0         9.1 MB  conda-forge
    libopenvino-intel-npu-plugin-2024.5.0|       hac27bb2_0         946 KB  conda-forge
    libopenvino-ir-frontend-2024.5.0|       h3f63f65_0         203 KB  conda-forge
    libopenvino-onnx-frontend-2024.5.0|       h5c8f2c3_0         1.5 MB  conda-forge
    libopenvino-paddle-frontend-2024.5.0|       h5c8f2c3_0         643 KB  conda-forge
    libopenvino-pytorch-frontend-2024.5.0|       h5888daf_0         1.1 MB  conda-forge
    libopenvino-tensorflow-frontend-2024.5.0|       h6481b9d_0         1.3 MB  conda-forge
    libopenvino-tensorflow-lite-frontend-2024.5.0|       h5888daf_0         474 KB  conda-forge
    librsvg-2.58.4             |       hc0ffecb_0         6.1 MB  conda-forge
    ocl-icd-2.3.2              |       hb9d3cd8_2          93 KB  conda-forge
    opencl-headers-2024.10.24  |       h5888daf_0          53 KB  conda-forge
    opencv-4.10.0              |qt6_py310ha05f5c2_613          26 KB  conda-forge
    openexr-3.3.2              |       h6326327_1         1.3 MB  conda-forge
    openh264-2.5.0             |       hf92e6e3_0         710 KB  conda-forge
    pango-1.54.0               |       h3a902e7_3         437 KB  conda-forge
    py-opencv-4.10.0           |qt6_py310h4bc6995_613         1.1 MB  conda-forge
    pyside6-6.7.3              |  py310hfd10a26_1        10.0 MB  conda-forge
    pytorch-2.4.0              |py3.10_cuda12.4_cudnn9.1.0_0        1.34 GB  pytorch
    qt6-main-6.7.3             |       h6e8976b_1        45.2 MB  conda-forge
    svt-av1-2.3.0              |       h5888daf_0         2.6 MB  conda-forge
    tbb-2022.0.0               |       hceb3a55_0         174 KB  conda-forge
    torchtriton-3.0.0          |            py310       233.4 MB  pytorch
    torchvision-0.19.0         |      py310_cu124         8.2 MB  pytorch
    ------------------------------------------------------------
                                           Total:        1.72 GB

The following NEW packages will be INSTALLED:

  dav1d              conda-forge/linux-64::dav1d-1.2.1-hd590300_0 
  freeglut           conda-forge/linux-64::freeglut-3.2.2-ha6d2627_3 
  fribidi            conda-forge/linux-64::fribidi-1.0.10-h36c2ea0_0 
  gdk-pixbuf         conda-forge/linux-64::gdk-pixbuf-2.42.12-hb9ae30d_0 
  hdf5               conda-forge/linux-64::hdf5-1.14.4-nompi_h2d575fe_105 
  imath              conda-forge/linux-64::imath-3.1.12-h7955e40_0 
  jasper             conda-forge/linux-64::jasper-4.2.4-h536e39c_0 
  libaec             conda-forge/linux-64::libaec-1.1.3-h59595ed_0 
  libass             conda-forge/linux-64::libass-0.17.3-h1dc1e6a_0 
  libgfortran        conda-forge/linux-64::libgfortran-14.2.0-h69a702a_1 
  libgfortran5       conda-forge/linux-64::libgfortran5-14.2.0-hd5240d6_1 
  libglu             conda-forge/linux-64::libglu-9.0.3-h03adeef_0 
  libhwloc           conda-forge/linux-64::libhwloc-2.11.2-default_h0d58e46_1001 
  liblapacke         conda-forge/linux-64::liblapacke-3.9.0-16_linux64_mkl 
  libopencv          conda-forge/linux-64::libopencv-4.10.0-qt6_py310h0bc352f_613 
  libopenvino        conda-forge/linux-64::libopenvino-2024.5.0-hac27bb2_0 
  libopenvino-auto-~ conda-forge/linux-64::libopenvino-auto-batch-plugin-2024.5.0-h4d9b6c2_0 
  libopenvino-auto-~ conda-forge/linux-64::libopenvino-auto-plugin-2024.5.0-h4d9b6c2_0 
  libopenvino-heter~ conda-forge/linux-64::libopenvino-hetero-plugin-2024.5.0-h3f63f65_0 
  libopenvino-intel~ conda-forge/linux-64::libopenvino-intel-cpu-plugin-2024.5.0-hac27bb2_0 
  libopenvino-intel~ conda-forge/linux-64::libopenvino-intel-gpu-plugin-2024.5.0-hac27bb2_0 
  libopenvino-intel~ conda-forge/linux-64::libopenvino-intel-npu-plugin-2024.5.0-hac27bb2_0 
  libopenvino-ir-fr~ conda-forge/linux-64::libopenvino-ir-frontend-2024.5.0-h3f63f65_0 
  libopenvino-onnx-~ conda-forge/linux-64::libopenvino-onnx-frontend-2024.5.0-h5c8f2c3_0 
  libopenvino-paddl~ conda-forge/linux-64::libopenvino-paddle-frontend-2024.5.0-h5c8f2c3_0 
  libopenvino-pytor~ conda-forge/linux-64::libopenvino-pytorch-frontend-2024.5.0-h5888daf_0 
  libopenvino-tenso~ conda-forge/linux-64::libopenvino-tensorflow-frontend-2024.5.0-h6481b9d_0 
  libopenvino-tenso~ conda-forge/linux-64::libopenvino-tensorflow-lite-frontend-2024.5.0-h5888daf_0 
  libopus            conda-forge/linux-64::libopus-1.3.1-h7f98852_1 
  librsvg            conda-forge/linux-64::librsvg-2.58.4-hc0ffecb_0 
  ocl-icd            conda-forge/linux-64::ocl-icd-2.3.2-hb9d3cd8_2 
  opencl-headers     conda-forge/linux-64::opencl-headers-2024.10.24-h5888daf_0 
  opencv             conda-forge/linux-64::opencv-4.10.0-qt6_py310ha05f5c2_613 
  openexr            conda-forge/linux-64::openexr-3.3.2-h6326327_1 
  pango              conda-forge/linux-64::pango-1.54.0-h3a902e7_3 
  pugixml            conda-forge/linux-64::pugixml-1.14-h59595ed_0 
  py-opencv          conda-forge/linux-64::py-opencv-4.10.0-qt6_py310h4bc6995_613 
  tbb                conda-forge/linux-64::tbb-2022.0.0-hceb3a55_0 

The following packages will be UPDATED:

  aom                                      3.6.1-h59595ed_0 --> 3.9.1-hac33072_0 
  ffmpeg                             4.4.2-gpl_hdf48244_113 --> 7.1.0-gpl_h4c12d27_707 
  libvpx                                  1.13.1-h59595ed_0 --> 1.14.1-hac33072_0 
  openh264                                 2.3.1-hcb278e6_2 --> 2.5.0-hf92e6e3_0 
  svt-av1                                  1.4.1-hcb278e6_0 --> 2.3.0-h5888daf_0 

The following packages will be DOWNGRADED:

  pyside6                             6.8.1-py310hfd10a26_0 --> 6.7.3-py310hfd10a26_1 
  pytorch                2.5.1-py3.10_cuda12.4_cudnn9.1.0_0 --> 2.4.0-py3.10_cuda12.4_cudnn9.1.0_0 
  qt6-main                                 6.8.1-h9d28a51_0 --> 6.7.3-h6e8976b_1 
  torchtriton                                   3.1.0-py310 --> 3.0.0-py310 
  torchvision                            0.20.1-py310_cu124 --> 0.19.0-py310_cu124 

Versions

torchvision=0.20.1-py310_cu124
pytorch=2.5.1-py3.10_cuda12.4_cudnn9.1.0_0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant