Unverified Commit 468690a6 authored by Nikita Shulga's avatar Nikita Shulga Committed by GitHub
Browse files

Move TorchAudio conda package to use pytorch-mutex (#1904)

This is follow up after https://github.com/pytorch/builder/pull/823 that gets rids of `feature` and migrate it to `run_constrained`
parent b9395a4f
......@@ -246,9 +246,9 @@ setup_conda_pytorch_constraint() {
# Translate CUDA_VERSION into CUDA_CUDATOOLKIT_CONSTRAINT
setup_conda_cudatoolkit_constraint() {
export CONDA_CPUONLY_FEATURE=""
export CONDA_BUILD_VARIANT="cuda"
if [[ "$(uname)" == Darwin ]]; then
export CONDA_CUDATOOLKIT_CONSTRAINT=""
export CONDA_BUILD_VARIANT="cpu"
else
case "$CU_VERSION" in
cu113)
......@@ -277,7 +277,7 @@ setup_conda_cudatoolkit_constraint() {
;;
cpu)
export CONDA_CUDATOOLKIT_CONSTRAINT=""
export CONDA_CPUONLY_FEATURE="- cpuonly"
export CONDA_BUILD_VARIANT="cpu"
;;
*)
echo "Unrecognized CU_VERSION=$CU_VERSION"
......
{% set build_variant = environ.get('CONDA_BUILD_VARIANT', 'cpu') %}
package:
name: torchaudio
version: "{{ environ.get('BUILD_VERSION', '0.0.0') }}"
......@@ -16,25 +17,32 @@ requirements:
- cmake
- ninja
- defaults::numpy >=1.11
- pytorch-mutex 1.0 {{ build_variant }} # [not osx ]
{{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT', 'pytorch') }}
{{ environ.get('CONDA_EXTRA_BUILD_CONSTRAINT', '') }}
{{ environ.get('CONDA_CPUONLY_FEATURE', '') }}
{{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }}
run:
- python
- defaults::numpy >=1.11
- pytorch-mutex 1.0 {{ build_variant }} # [not osx ]
{{ environ.get('CONDA_PYTORCH_CONSTRAINT', 'pytorch') }}
{{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }}
{% if build_variant == 'cpu' %}
run_constrained:
- cpuonly
{% elif not osx %}
run_constrained:
- cpuonly <0
{% endif %}
build:
string: py{{py}}_{{ environ.get('CU_VERSION', 'cpu') }}
script_env:
- BUILD_VERSION
- USE_CUDA
- TORCH_CUDA_ARCH_LIST
features:
{{ environ.get('CONDA_CPUONLY_FEATURE', '') }}
test:
imports:
......@@ -52,7 +60,7 @@ test:
# Ideally we would test this, but conda doesn't provide librosa
# - librosa >=0.4.3
- scipy
{{ environ.get('CONDA_CPUONLY_FEATURE', '') }}
- pytorch-mutex 1.0 {{ build_variant }} # [not osx ]
about:
home: https://github.com/pytorch/audio
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment