meta.yaml 1.63 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
    - jpeg
14
15
    # NOTE: The only ffmpeg version that we build is actually 4.2
    - ffmpeg >=4.2  # [not win]
16
17
18
19

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

  run:
    - python
26
    - defaults::numpy >=1.11
27
    - requests
28
    - libpng
29
    - ffmpeg >=4.2  # [not win]
30
    - jpeg
31
    - pillow >=5.3.0, !=8.3.*
32
    - pytorch-mutex 1.0 {{ build_variant }}  # [not osx ]
33
    {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }}
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
    - jpeg
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'