meta.yaml 1.68 KB
Newer Older
1
{% set build_variant = environ.get('CONDA_BUILD_VARIANT', 'cpu') %}
2
package:
3
4
  name: torchvision
  version: "{{ environ.get('BUILD_VERSION') }}"
5
6

source:
7
 path: "{{ environ.get('SOURCE_ROOT_DIR') }}"
8
9
10
11

requirements:
  build:
    - {{ compiler('c') }} # [win]
12
    - libpng
13
    - libjpeg-turbo
14
    - ffmpeg >=4.2.2, <5.0.0  # [linux]
15
16
17
18

  host:
    - python
    - setuptools
19
    - pytorch-mutex 1.0 {{ build_variant }}  # [not osx ]
20
    {{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT', 'pytorch') }}
21
    {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }}
22
23
24

  run:
    - python
25
26
    - defaults::numpy >=1.11 # [py <= 310]
    - numpy >=1.23.5 # [py >= 311]
27
    - requests
28
    - libpng
29
    - ffmpeg >=4.2.2, <5.0.0  # [linux]
30
    - libjpeg-turbo
31
    - pillow >=5.3.0, !=8.3.*
32
    - pytorch-mutex 1.0 {{ build_variant }}  # [not osx ]
33
    {{ environ.get('CONDA_PYTORCH_CONSTRAINT', 'pytorch') }}
34
35
36
37
38
39
40
41
42
    {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }}

  {% if build_variant == 'cpu' %}
  run_constrained:
    - cpuonly
  {% elif not osx %}
  run_constrained:
     - cpuonly <0
  {% endif %}
43
44

build:
45
  string: py{{py}}_{{ environ['CU_VERSION'] }}
peterjc123's avatar
peterjc123 committed
46
  script: python setup.py install --single-version-externally-managed --record=record.txt
47
  script_env:
Edward Z. Yang's avatar
Edward Z. Yang committed
48
49
    - CUDA_HOME
    - FORCE_CUDA
50
    - BUILD_VERSION
51
    - TORCH_CUDA_ARCH_LIST
52
    - MACOSX_DEPLOYMENT_TARGET
53
54
55
56
57
58
59
60
61
62
63

test:
  imports:
    - torchvision
    - torchvision.datasets
    - torchvision.transforms
  source_files:
    - test
  requires:
    - pytest
    - scipy
64
    - libjpeg-turbo
65
    - ca-certificates
66
67
68
69
70
71
72


about:
  home: https://github.com/pytorch/vision
  license: BSD
  license_file: LICENSE
  summary: 'image and video datasets and models for torch deep learning'