File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -246,9 +246,9 @@ setup_conda_pytorch_constraint() {
246246
247247# Translate CUDA_VERSION into CUDA_CUDATOOLKIT_CONSTRAINT
248248setup_conda_cudatoolkit_constraint () {
249- export CONDA_CPUONLY_FEATURE= " "
249+ export CONDA_BUILD_VARIANT= " cuda "
250250 if [[ " $( uname) " == Darwin ]]; then
251- export CONDA_CUDATOOLKIT_CONSTRAINT= " "
251+ export CONDA_BUILD_VARIANT= " cpu "
252252 else
253253 case " $CU_VERSION " in
254254 cu113)
@@ -277,7 +277,7 @@ setup_conda_cudatoolkit_constraint() {
277277 ;;
278278 cpu)
279279 export CONDA_CUDATOOLKIT_CONSTRAINT=" "
280- export CONDA_CPUONLY_FEATURE= " - cpuonly "
280+ export CONDA_BUILD_VARIANT= " cpu "
281281 ;;
282282 * )
283283 echo " Unrecognized CU_VERSION=$CU_VERSION "
Original file line number Diff line number Diff line change 1+ {% set build_variant = environ.get('CONDA_BUILD_VARIANT', 'cpu') %}
12package :
23 name : torchaudio
34 version : " {{ environ.get('BUILD_VERSION', '0.0.0') }}"
@@ -16,25 +17,32 @@ requirements:
1617 - cmake
1718 - ninja
1819 - defaults::numpy >=1.11
20+ - pytorch-mutex 1.0 {{ build_variant }} # [not osx ]
1921 {{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT', 'pytorch') }}
2022 {{ environ.get('CONDA_EXTRA_BUILD_CONSTRAINT', '') }}
21- {{ environ.get('CONDA_CPUONLY_FEATURE', '') }}
2223 {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }}
2324
2425 run :
2526 - python
2627 - defaults::numpy >=1.11
28+ - pytorch-mutex 1.0 {{ build_variant }} # [not osx ]
2729 {{ environ.get('CONDA_PYTORCH_CONSTRAINT', 'pytorch') }}
2830 {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }}
2931
32+ {% if build_variant == 'cpu' %}
33+ run_constrained :
34+ - cpuonly
35+ {% elif not osx %}
36+ run_constrained :
37+ - cpuonly <0
38+ {% endif %}
39+
3040build :
3141 string : py{{py}}_{{ environ.get('CU_VERSION', 'cpu') }}
3242 script_env :
3343 - BUILD_VERSION
3444 - USE_CUDA
3545 - TORCH_CUDA_ARCH_LIST
36- features :
37- {{ environ.get('CONDA_CPUONLY_FEATURE', '') }}
3846
3947test :
4048 imports :
5260 # Ideally we would test this, but conda doesn't provide librosa
5361 # - librosa >=0.4.3
5462 - scipy
55- {{ environ.get('CONDA_CPUONLY_FEATURE', '') }}
63+ - pytorch-mutex 1.0 {{ build_variant }} # [not osx ]
5664
5765about :
5866 home : https://github.com/pytorch/audio
You can’t perform that action at this time.
0 commit comments