meta.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {% set build_variant = environ.get('CONDA_BUILD_VARIANT', 'cpu') %}
  2. package:
  3. name: torchvision
  4. version: "{{ environ.get('BUILD_VERSION') }}"
  5. source:
  6. path: "{{ environ.get('SOURCE_ROOT_DIR') }}"
  7. requirements:
  8. build:
  9. - {{ compiler('c') }} # [win]
  10. - libpng
  11. - libjpeg-turbo
  12. # NOTE: The only ffmpeg version that we build is actually 4.2
  13. - ffmpeg >=4.2 # [not win]
  14. host:
  15. - python
  16. - setuptools
  17. - pytorch-mutex 1.0 {{ build_variant }} # [not osx ]
  18. {{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT') }}
  19. {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }}
  20. run:
  21. - python
  22. - defaults::numpy >=1.11 # [py <= 310]
  23. - numpy >=1.23.5 # [py >= 311]
  24. - requests
  25. - libpng
  26. - ffmpeg >=4.2 # [not win]
  27. - libjpeg-turbo
  28. - pillow >=5.3.0, !=8.3.*
  29. - pytorch-mutex 1.0 {{ build_variant }} # [not osx ]
  30. {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }}
  31. {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }}
  32. {% if build_variant == 'cpu' %}
  33. run_constrained:
  34. - cpuonly
  35. {% elif not osx %}
  36. run_constrained:
  37. - cpuonly <0
  38. {% endif %}
  39. build:
  40. string: py{{py}}_{{ environ['CU_VERSION'] }}
  41. script: python setup.py install --single-version-externally-managed --record=record.txt
  42. script_env:
  43. - CUDA_HOME
  44. - FORCE_CUDA
  45. - BUILD_VERSION
  46. - TORCH_CUDA_ARCH_LIST
  47. - MACOSX_DEPLOYMENT_TARGET
  48. test:
  49. imports:
  50. - torchvision
  51. - torchvision.datasets
  52. - torchvision.transforms
  53. source_files:
  54. - test
  55. requires:
  56. - pytest
  57. - scipy
  58. - libjpeg-turbo
  59. - ca-certificates
  60. about:
  61. home: https://github.com/pytorch/vision
  62. license: BSD
  63. license_file: LICENSE
  64. summary: 'image and video datasets and models for torch deep learning'