meta.yaml 1.59 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
    - libpng
28
    - ffmpeg >=4.2  # [not win]
29
    - jpeg
30
    - pillow >=5.3.0, !=8.3.*
31
    - pytorch-mutex 1.0 {{ build_variant }}  # [not osx ]
32
    {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }}
33
34
35
36
37
38
39
40
41
    {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }}

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

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

test:
  imports:
    - torchvision
    - torchvision.datasets
    - torchvision.transforms
  source_files:
    - test
  requires:
    - pytest
    - scipy
62
    - jpeg
63
    - ca-certificates
64
65
66
67
68
69
70


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