pytorch / vision

Datasets, Transforms and Models specific to Computer Vision
https://pytorch.org/vision
BSD 3-Clause "New" or "Revised" License
16.13k stars 6.94k forks source link

pytorch/torchvision on anaconda.org depends on ffmpeg #7696

Open zooba opened 1 year ago

zooba commented 1 year ago

🐛 Describe the bug

I'm assuming https://anaconda.org/pytorch/torchvision is where your own published packages go (as opposed to conda-forge, which is not relevant here).

Based on other discussions relating to ffmpeg, GPL, patents, etc., my understanding is that the torchvision packages should not be requiring ffmpeg to install, but will use it if it's available. This enables users with licensing concerns to simply omit it.

I also see from those discussions that conda-forge and PyPI may have different requirements. That's fine, I'm definitely 100% talking about https://anaconda.org/pytorch/torchvision only and not those other indexes.

Checking the 0.15.2 release (latest) for Linux, I see ffmpeg is listed in the index.json file (listed below). This makes it very difficult to install using conda without also installing ffmpeg - specifically, I have to install torchvision by itself and list its other dependencies manually, which is only doable with custom scripting and not a standard environment definition or metapackage.

Can we get builds that do not list ffmpeg as a dependency? It seems that was the intention, so I'm guessing something slipped in at some point.

{
  "arch": "x86_64",
  "build": "py38_cu118",
  "build_number": 0,
  "constrains": [
    "cpuonly <0"
  ],
  "depends": [
    "ffmpeg >=4.2",
    "jpeg",
    "libpng",
    "numpy >=1.11",
    "pillow >=5.3.0,!=8.3.*",
    "python >=3.8,<3.9.0a0",
    "pytorch 2.0.1",
    "pytorch-cuda 11.8.*",
    "pytorch-mutex 1.0 cuda",
    "requests"
  ],
  "license": "BSD",
  "name": "torchvision",
  "platform": "linux",
  "subdir": "linux-64",
  "timestamp": 1682362621404,
  "version": "0.15.2"
}

Versions

Checked with linux-64/torchvision-0.15.2-py38_cu118.tar.bz2 at https://anaconda.org/pytorch/torchvision/files

pmeier commented 1 year ago

cc @atalman @osalpekar