Unverified Commit eb1b3f1f authored by Eli Uriegas's avatar Eli Uriegas Committed by GitHub
Browse files

Add Python 3.9 support (#1242)


Signed-off-by: default avatarEli Uriegas <eliuriegas@fb.com>
parent 3488f314
...@@ -45,6 +45,16 @@ commands: ...@@ -45,6 +45,16 @@ commands:
name: Install pkg-config name: Install pkg-config
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config wget command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config wget
# Disable brew auto update which is very slow # Disable brew auto update which is very slow
load_conda_channel_flags:
description: "Determines whether we need extra conda channels"
steps:
- run:
name: Adding CONDA_CHANNEL_FLAGS to BASH_ENV
command: |
CONDA_CHANNEL_FLAGS=""
if [[ "${PYTHON_VERSION}" = *3.9* ]]; then
echo "export CONDA_CHANNEL_FLAGS=-c=conda-forge" >> ${BASH_ENV}
fi
binary_common: &binary_common binary_common: &binary_common
parameters: parameters:
...@@ -117,7 +127,7 @@ jobs: ...@@ -117,7 +127,7 @@ jobs:
binary_linux_wheel: binary_linux_wheel:
<<: *binary_common <<: *binary_common
docker: docker:
- image: "pytorch/manylinux-cuda100" - image: "pytorch/manylinux-cuda102"
resource_class: 2xlarge+ resource_class: 2xlarge+
steps: steps:
- checkout - checkout
...@@ -138,6 +148,7 @@ jobs: ...@@ -138,6 +148,7 @@ jobs:
resource_class: 2xlarge+ resource_class: 2xlarge+
steps: steps:
- checkout - checkout
- load_conda_channel_flags
- attach_workspace: - attach_workspace:
at: third_party at: third_party
- run: packaging/build_conda.sh - run: packaging/build_conda.sh
...@@ -155,6 +166,7 @@ jobs: ...@@ -155,6 +166,7 @@ jobs:
steps: steps:
- checkout - checkout
- install_build_tools_macos - install_build_tools_macos
- load_conda_channel_flags
- attach_workspace: - attach_workspace:
at: third_party at: third_party
- run: - run:
...@@ -180,6 +192,7 @@ jobs: ...@@ -180,6 +192,7 @@ jobs:
steps: steps:
- checkout - checkout
- install_build_tools_macos - install_build_tools_macos
- load_conda_channel_flags
- attach_workspace: - attach_workspace:
at: third_party at: third_party
- run: - run:
...@@ -202,6 +215,7 @@ jobs: ...@@ -202,6 +215,7 @@ jobs:
name: windows-cpu name: windows-cpu
steps: steps:
- checkout - checkout
- load_conda_channel_flags
- run: - run:
name: build name: build
command: | command: |
...@@ -221,6 +235,7 @@ jobs: ...@@ -221,6 +235,7 @@ jobs:
name: windows-cpu name: windows-cpu
steps: steps:
- checkout - checkout
- load_conda_channel_flags
- run: - run:
name: build name: build
command: | command: |
...@@ -278,6 +293,7 @@ jobs: ...@@ -278,6 +293,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: install binaries name: install binaries
command: | command: |
...@@ -297,6 +313,7 @@ jobs: ...@@ -297,6 +313,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: install binaries name: install binaries
command: | command: |
...@@ -317,6 +334,7 @@ jobs: ...@@ -317,6 +334,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: install binaries name: install binaries
command: | command: |
...@@ -342,6 +360,7 @@ jobs: ...@@ -342,6 +360,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: install binaries name: install binaries
command: | command: |
...@@ -395,6 +414,7 @@ jobs: ...@@ -395,6 +414,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: third_party at: third_party
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: Setup name: Setup
command: .circleci/unittest/linux/scripts/setup_env.sh command: .circleci/unittest/linux/scripts/setup_env.sh
...@@ -423,6 +443,7 @@ jobs: ...@@ -423,6 +443,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: third_party at: third_party
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: Pull Docker image name: Pull Docker image
command: docker pull --quiet "${image_name}" command: docker pull --quiet "${image_name}"
...@@ -431,7 +452,7 @@ jobs: ...@@ -431,7 +452,7 @@ jobs:
command: docker run -t --gpus all -e PYTHON_VERSION -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh command: docker run -t --gpus all -e PYTHON_VERSION -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh
- run: - run:
name: Install torchaudio name: Install torchaudio
command: docker run -t --gpus all -e UPLOAD_CHANNEL -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/install.sh command: docker run -t --gpus all -e UPLOAD_CHANNEL -e CONDA_CHANNEL_FLAGS -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/install.sh
- run: - run:
name: Run tests name: Run tests
command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh
...@@ -448,6 +469,7 @@ jobs: ...@@ -448,6 +469,7 @@ jobs:
steps: steps:
- checkout - checkout
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: Setup name: Setup
command: .circleci/unittest/windows/scripts/setup_env.sh command: .circleci/unittest/windows/scripts/setup_env.sh
...@@ -473,6 +495,7 @@ jobs: ...@@ -473,6 +495,7 @@ jobs:
steps: steps:
- checkout - checkout
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: Setup name: Setup
command: .circleci/unittest/windows/scripts/setup_env.sh command: .circleci/unittest/windows/scripts/setup_env.sh
...@@ -496,6 +519,7 @@ jobs: ...@@ -496,6 +519,7 @@ jobs:
steps: steps:
- checkout - checkout
- install_build_tools_macos - install_build_tools_macos
- load_conda_channel_flags
- attach_workspace: - attach_workspace:
at: third_party at: third_party
- designate_upload_channel - designate_upload_channel
...@@ -522,6 +546,7 @@ jobs: ...@@ -522,6 +546,7 @@ jobs:
steps: steps:
- checkout - checkout
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: Setup name: Setup
command: .circleci/unittest/linux/scripts/setup_env.sh command: .circleci/unittest/linux/scripts/setup_env.sh
...@@ -538,6 +563,7 @@ jobs: ...@@ -538,6 +563,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- checkout - checkout
- load_conda_channel_flags
- run: - run:
name: Install pytorch-audio name: Install pytorch-audio
command: .circleci/build_docs/install_wheels.sh command: .circleci/build_docs/install_wheels.sh
...@@ -610,6 +636,11 @@ workflows: ...@@ -610,6 +636,11 @@ workflows:
python_version: '3.8' python_version: '3.8'
requires: requires:
- download_third_parties_nix - download_third_parties_nix
- binary_linux_wheel:
name: binary_linux_wheel_py3.9
python_version: '3.9'
requires:
- download_third_parties_nix
- binary_macos_wheel: - binary_macos_wheel:
name: binary_macos_wheel_py3.6 name: binary_macos_wheel_py3.6
python_version: '3.6' python_version: '3.6'
...@@ -625,6 +656,11 @@ workflows: ...@@ -625,6 +656,11 @@ workflows:
python_version: '3.8' python_version: '3.8'
requires: requires:
- download_third_parties_nix - download_third_parties_nix
- binary_macos_wheel:
name: binary_macos_wheel_py3.9
python_version: '3.9'
requires:
- download_third_parties_nix
- binary_windows_wheel: - binary_windows_wheel:
name: binary_windows_wheel_py3.6 name: binary_windows_wheel_py3.6
python_version: '3.6' python_version: '3.6'
...@@ -634,6 +670,9 @@ workflows: ...@@ -634,6 +670,9 @@ workflows:
- binary_windows_wheel: - binary_windows_wheel:
name: binary_windows_wheel_py3.8 name: binary_windows_wheel_py3.8
python_version: '3.8' python_version: '3.8'
- binary_windows_wheel:
name: binary_windows_wheel_py3.9
python_version: '3.9'
- binary_linux_conda: - binary_linux_conda:
name: binary_linux_conda_py3.6 name: binary_linux_conda_py3.6
python_version: '3.6' python_version: '3.6'
...@@ -649,6 +688,11 @@ workflows: ...@@ -649,6 +688,11 @@ workflows:
python_version: '3.8' python_version: '3.8'
requires: requires:
- download_third_parties_nix - download_third_parties_nix
- binary_linux_conda:
name: binary_linux_conda_py3.9
python_version: '3.9'
requires:
- download_third_parties_nix
- binary_macos_conda: - binary_macos_conda:
name: binary_macos_conda_py3.6 name: binary_macos_conda_py3.6
python_version: '3.6' python_version: '3.6'
...@@ -664,6 +708,11 @@ workflows: ...@@ -664,6 +708,11 @@ workflows:
python_version: '3.8' python_version: '3.8'
requires: requires:
- download_third_parties_nix - download_third_parties_nix
- binary_macos_conda:
name: binary_macos_conda_py3.9
python_version: '3.9'
requires:
- download_third_parties_nix
- binary_windows_conda: - binary_windows_conda:
name: binary_windows_conda_py3.6 name: binary_windows_conda_py3.6
python_version: '3.6' python_version: '3.6'
...@@ -673,6 +722,9 @@ workflows: ...@@ -673,6 +722,9 @@ workflows:
- binary_windows_conda: - binary_windows_conda:
name: binary_windows_conda_py3.8 name: binary_windows_conda_py3.8
python_version: '3.8' python_version: '3.8'
- binary_windows_conda:
name: binary_windows_conda_py3.9
python_version: '3.9'
- build_docs: - build_docs:
name: build_docs name: build_docs
python_version: '3.8' python_version: '3.8'
...@@ -717,6 +769,11 @@ workflows: ...@@ -717,6 +769,11 @@ workflows:
python_version: '3.8' python_version: '3.8'
requires: requires:
- download_third_parties_nix - download_third_parties_nix
- unittest_linux_cpu:
name: unittest_linux_cpu_py3.9
python_version: '3.9'
requires:
- download_third_parties_nix
- unittest_linux_gpu: - unittest_linux_gpu:
name: unittest_linux_gpu_py3.6 name: unittest_linux_gpu_py3.6
python_version: '3.6' python_version: '3.6'
...@@ -732,6 +789,11 @@ workflows: ...@@ -732,6 +789,11 @@ workflows:
python_version: '3.8' python_version: '3.8'
requires: requires:
- download_third_parties_nix - download_third_parties_nix
- unittest_linux_gpu:
name: unittest_linux_gpu_py3.9
python_version: '3.9'
requires:
- download_third_parties_nix
- unittest_windows_cpu: - unittest_windows_cpu:
name: unittest_windows_cpu_py3.6 name: unittest_windows_cpu_py3.6
python_version: '3.6' python_version: '3.6'
...@@ -741,6 +803,9 @@ workflows: ...@@ -741,6 +803,9 @@ workflows:
- unittest_windows_cpu: - unittest_windows_cpu:
name: unittest_windows_cpu_py3.8 name: unittest_windows_cpu_py3.8
python_version: '3.8' python_version: '3.8'
- unittest_windows_cpu:
name: unittest_windows_cpu_py3.9
python_version: '3.9'
- unittest_windows_gpu: - unittest_windows_gpu:
name: unittest_windows_gpu_py3.6 name: unittest_windows_gpu_py3.6
python_version: '3.6' python_version: '3.6'
...@@ -750,6 +815,9 @@ workflows: ...@@ -750,6 +815,9 @@ workflows:
- unittest_windows_gpu: - unittest_windows_gpu:
name: unittest_windows_gpu_py3.8 name: unittest_windows_gpu_py3.8
python_version: '3.8' python_version: '3.8'
- unittest_windows_gpu:
name: unittest_windows_gpu_py3.9
python_version: '3.9'
- unittest_macos_cpu: - unittest_macos_cpu:
name: unittest_macos_cpu_py3.6 name: unittest_macos_cpu_py3.6
python_version: '3.6' python_version: '3.6'
...@@ -765,6 +833,11 @@ workflows: ...@@ -765,6 +833,11 @@ workflows:
python_version: '3.8' python_version: '3.8'
requires: requires:
- download_third_parties_nix - download_third_parties_nix
- unittest_macos_cpu:
name: unittest_macos_cpu_py3.9
python_version: '3.9'
requires:
- download_third_parties_nix
nightly: nightly:
jobs: jobs:
- circleci_consistency: - circleci_consistency:
...@@ -878,6 +951,39 @@ workflows: ...@@ -878,6 +951,39 @@ workflows:
python_version: '3.8' python_version: '3.8'
requires: requires:
- nightly_binary_linux_wheel_py3.8_upload - nightly_binary_linux_wheel_py3.8_upload
- binary_linux_wheel:
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_linux_wheel_py3.9
python_version: '3.9'
requires:
- download_third_parties_nix
- binary_wheel_upload:
context: org-member
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_linux_wheel_py3.9_upload
requires:
- nightly_binary_linux_wheel_py3.9
- smoke_test_linux_pip:
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_linux_wheel_py3.9_smoke_test_pip
python_version: '3.9'
requires:
- nightly_binary_linux_wheel_py3.9_upload
- binary_macos_wheel: - binary_macos_wheel:
filters: filters:
branches: branches:
...@@ -944,6 +1050,28 @@ workflows: ...@@ -944,6 +1050,28 @@ workflows:
name: nightly_binary_macos_wheel_py3.8_upload name: nightly_binary_macos_wheel_py3.8_upload
requires: requires:
- nightly_binary_macos_wheel_py3.8 - nightly_binary_macos_wheel_py3.8
- binary_macos_wheel:
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_macos_wheel_py3.9
python_version: '3.9'
requires:
- download_third_parties_nix
- binary_wheel_upload:
context: org-member
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_macos_wheel_py3.9_upload
requires:
- nightly_binary_macos_wheel_py3.9
- binary_windows_wheel: - binary_windows_wheel:
filters: filters:
branches: branches:
...@@ -1037,6 +1165,37 @@ workflows: ...@@ -1037,6 +1165,37 @@ workflows:
python_version: '3.8' python_version: '3.8'
requires: requires:
- nightly_binary_windows_wheel_py3.8_upload - nightly_binary_windows_wheel_py3.8_upload
- binary_windows_wheel:
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_windows_wheel_py3.9
python_version: '3.9'
- binary_wheel_upload:
context: org-member
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_windows_wheel_py3.9_upload
requires:
- nightly_binary_windows_wheel_py3.9
- smoke_test_windows_pip:
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_windows_wheel_py3.9_smoke_test_pip
python_version: '3.9'
requires:
- nightly_binary_windows_wheel_py3.9_upload
- binary_linux_conda: - binary_linux_conda:
filters: filters:
branches: branches:
...@@ -1136,6 +1295,39 @@ workflows: ...@@ -1136,6 +1295,39 @@ workflows:
python_version: '3.8' python_version: '3.8'
requires: requires:
- nightly_binary_linux_conda_py3.8_upload - nightly_binary_linux_conda_py3.8_upload
- binary_linux_conda:
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_linux_conda_py3.9
python_version: '3.9'
requires:
- download_third_parties_nix
- binary_conda_upload:
context: org-member
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_linux_conda_py3.9_upload
requires:
- nightly_binary_linux_conda_py3.9
- smoke_test_linux_conda:
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_linux_conda_py3.9_smoke_test_conda
python_version: '3.9'
requires:
- nightly_binary_linux_conda_py3.9_upload
- binary_macos_conda: - binary_macos_conda:
filters: filters:
branches: branches:
...@@ -1202,6 +1394,28 @@ workflows: ...@@ -1202,6 +1394,28 @@ workflows:
name: nightly_binary_macos_conda_py3.8_upload name: nightly_binary_macos_conda_py3.8_upload
requires: requires:
- nightly_binary_macos_conda_py3.8 - nightly_binary_macos_conda_py3.8
- binary_macos_conda:
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_macos_conda_py3.9
python_version: '3.9'
requires:
- download_third_parties_nix
- binary_conda_upload:
context: org-member
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_macos_conda_py3.9_upload
requires:
- nightly_binary_macos_conda_py3.9
- binary_windows_conda: - binary_windows_conda:
filters: filters:
branches: branches:
...@@ -1295,6 +1509,37 @@ workflows: ...@@ -1295,6 +1509,37 @@ workflows:
python_version: '3.8' python_version: '3.8'
requires: requires:
- nightly_binary_windows_conda_py3.8_upload - nightly_binary_windows_conda_py3.8_upload
- binary_windows_conda:
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_windows_conda_py3.9
python_version: '3.9'
- binary_conda_upload:
context: org-member
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_windows_conda_py3.9_upload
requires:
- nightly_binary_windows_conda_py3.9
- smoke_test_windows_conda:
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_windows_conda_py3.9_smoke_test_conda
python_version: '3.9'
requires:
- nightly_binary_windows_conda_py3.9_upload
docker_build: docker_build:
triggers: triggers:
- schedule: - schedule:
......
...@@ -45,6 +45,16 @@ commands: ...@@ -45,6 +45,16 @@ commands:
name: Install pkg-config name: Install pkg-config
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config wget command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config wget
# Disable brew auto update which is very slow # Disable brew auto update which is very slow
load_conda_channel_flags:
description: "Determines whether we need extra conda channels"
steps:
- run:
name: Adding CONDA_CHANNEL_FLAGS to BASH_ENV
command: |
CONDA_CHANNEL_FLAGS=""
if [[ "${PYTHON_VERSION}" = *3.9* ]]; then
echo "export CONDA_CHANNEL_FLAGS=-c=conda-forge" >> ${BASH_ENV}
fi
binary_common: &binary_common binary_common: &binary_common
parameters: parameters:
...@@ -117,7 +127,7 @@ jobs: ...@@ -117,7 +127,7 @@ jobs:
binary_linux_wheel: binary_linux_wheel:
<<: *binary_common <<: *binary_common
docker: docker:
- image: "pytorch/manylinux-cuda100" - image: "pytorch/manylinux-cuda102"
resource_class: 2xlarge+ resource_class: 2xlarge+
steps: steps:
- checkout - checkout
...@@ -138,6 +148,7 @@ jobs: ...@@ -138,6 +148,7 @@ jobs:
resource_class: 2xlarge+ resource_class: 2xlarge+
steps: steps:
- checkout - checkout
- load_conda_channel_flags
- attach_workspace: - attach_workspace:
at: third_party at: third_party
- run: packaging/build_conda.sh - run: packaging/build_conda.sh
...@@ -155,6 +166,7 @@ jobs: ...@@ -155,6 +166,7 @@ jobs:
steps: steps:
- checkout - checkout
- install_build_tools_macos - install_build_tools_macos
- load_conda_channel_flags
- attach_workspace: - attach_workspace:
at: third_party at: third_party
- run: - run:
...@@ -180,6 +192,7 @@ jobs: ...@@ -180,6 +192,7 @@ jobs:
steps: steps:
- checkout - checkout
- install_build_tools_macos - install_build_tools_macos
- load_conda_channel_flags
- attach_workspace: - attach_workspace:
at: third_party at: third_party
- run: - run:
...@@ -202,6 +215,7 @@ jobs: ...@@ -202,6 +215,7 @@ jobs:
name: windows-cpu name: windows-cpu
steps: steps:
- checkout - checkout
- load_conda_channel_flags
- run: - run:
name: build name: build
command: | command: |
...@@ -221,6 +235,7 @@ jobs: ...@@ -221,6 +235,7 @@ jobs:
name: windows-cpu name: windows-cpu
steps: steps:
- checkout - checkout
- load_conda_channel_flags
- run: - run:
name: build name: build
command: | command: |
...@@ -278,6 +293,7 @@ jobs: ...@@ -278,6 +293,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: install binaries name: install binaries
command: | command: |
...@@ -297,6 +313,7 @@ jobs: ...@@ -297,6 +313,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: install binaries name: install binaries
command: | command: |
...@@ -317,6 +334,7 @@ jobs: ...@@ -317,6 +334,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: install binaries name: install binaries
command: | command: |
...@@ -342,6 +360,7 @@ jobs: ...@@ -342,6 +360,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: install binaries name: install binaries
command: | command: |
...@@ -395,6 +414,7 @@ jobs: ...@@ -395,6 +414,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: third_party at: third_party
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: Setup name: Setup
command: .circleci/unittest/linux/scripts/setup_env.sh command: .circleci/unittest/linux/scripts/setup_env.sh
...@@ -423,6 +443,7 @@ jobs: ...@@ -423,6 +443,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: third_party at: third_party
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: Pull Docker image name: Pull Docker image
command: docker pull --quiet "${image_name}" command: docker pull --quiet "${image_name}"
...@@ -431,7 +452,7 @@ jobs: ...@@ -431,7 +452,7 @@ jobs:
command: docker run -t --gpus all -e PYTHON_VERSION -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh command: docker run -t --gpus all -e PYTHON_VERSION -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh
- run: - run:
name: Install torchaudio name: Install torchaudio
command: docker run -t --gpus all -e UPLOAD_CHANNEL -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/install.sh command: docker run -t --gpus all -e UPLOAD_CHANNEL -e CONDA_CHANNEL_FLAGS -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/install.sh
- run: - run:
name: Run tests name: Run tests
command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh
...@@ -448,6 +469,7 @@ jobs: ...@@ -448,6 +469,7 @@ jobs:
steps: steps:
- checkout - checkout
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: Setup name: Setup
command: .circleci/unittest/windows/scripts/setup_env.sh command: .circleci/unittest/windows/scripts/setup_env.sh
...@@ -473,6 +495,7 @@ jobs: ...@@ -473,6 +495,7 @@ jobs:
steps: steps:
- checkout - checkout
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: Setup name: Setup
command: .circleci/unittest/windows/scripts/setup_env.sh command: .circleci/unittest/windows/scripts/setup_env.sh
...@@ -496,6 +519,7 @@ jobs: ...@@ -496,6 +519,7 @@ jobs:
steps: steps:
- checkout - checkout
- install_build_tools_macos - install_build_tools_macos
- load_conda_channel_flags
- attach_workspace: - attach_workspace:
at: third_party at: third_party
- designate_upload_channel - designate_upload_channel
...@@ -522,6 +546,7 @@ jobs: ...@@ -522,6 +546,7 @@ jobs:
steps: steps:
- checkout - checkout
- designate_upload_channel - designate_upload_channel
- load_conda_channel_flags
- run: - run:
name: Setup name: Setup
command: .circleci/unittest/linux/scripts/setup_env.sh command: .circleci/unittest/linux/scripts/setup_env.sh
...@@ -538,6 +563,7 @@ jobs: ...@@ -538,6 +563,7 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/workspace at: ~/workspace
- checkout - checkout
- load_conda_channel_flags
- run: - run:
name: Install pytorch-audio name: Install pytorch-audio
command: .circleci/build_docs/install_wheels.sh command: .circleci/build_docs/install_wheels.sh
......
...@@ -19,7 +19,7 @@ import yaml ...@@ -19,7 +19,7 @@ import yaml
import os.path import os.path
PYTHON_VERSIONS = ["3.6", "3.7", "3.8"] PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
DOC_VERSION = ('linux', '3.8') DOC_VERSION = ('linux', '3.8')
......
...@@ -34,7 +34,11 @@ else ...@@ -34,7 +34,11 @@ else
cudatoolkit="cudatoolkit=${version}" cudatoolkit="cudatoolkit=${version}"
fi fi
printf "Installing PyTorch with %s\n" "${cudatoolkit}" printf "Installing PyTorch with %s\n" "${cudatoolkit}"
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" pytorch ${cudatoolkit} (
set -x
conda install ${CONDA_CHANNEL_FLAGS:-} -y defaults::numpy
conda install ${CONDA_CHANNEL_FLAGS:-} -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}::pytorch" ${cudatoolkit}
)
# 2. Install torchaudio # 2. Install torchaudio
printf "* Installing torchaudio\n" printf "* Installing torchaudio\n"
...@@ -43,11 +47,15 @@ BUILD_TRANSDUCER=1 BUILD_SOX=1 python setup.py install ...@@ -43,11 +47,15 @@ BUILD_TRANSDUCER=1 BUILD_SOX=1 python setup.py install
# 3. Install Test tools # 3. Install Test tools
printf "* Installing test tools\n" printf "* Installing test tools\n"
if [ "${os}" == Linux ] ; then NUMBA_DEV_CHANNEL=""
conda install -y -c conda-forge codecov pytest pytest-cov if [[ "$(python --version)" = *3.9* ]]; then
pip install kaldi-io 'librosa>=0.8.0' parameterized SoundFile scipy 'requests>=2.20' # Numba isn't available for Python 3.9 except on the numba dev channel and building from source fails
else # See https://github.com/librosa/librosa/issues/1270#issuecomment-759065048
# Note: installing librosa via pip fail because it will try to compile numba. NUMBA_DEV_CHANNEL="-c numba/label/dev"
conda install -y -c conda-forge codecov pytest pytest-cov 'librosa>=0.8.0' parameterized scipy
pip install kaldi-io SoundFile 'requests>=2.20'
fi fi
# Note: installing librosa via pip fail because it will try to compile numba.
(
set -x
conda install -y -c conda-forge ${NUMBA_DEV_CHANNEL} 'librosa>=0.8.0' parameterized 'requests>=2.20'
pip install kaldi-io SoundFile codecov pytest pytest-cov scipy
)
channels:
- conda-forge
- defaults
dependencies:
- flake8
- pytest
- pytest-cov
- codecov
- scipy >= 1.4.1
- pip
- pip:
- kaldi-io
- PySoundFile
- future
- parameterized
- dataclasses
...@@ -25,7 +25,7 @@ else ...@@ -25,7 +25,7 @@ else
cudatoolkit="cudatoolkit=${version}" cudatoolkit="cudatoolkit=${version}"
fi fi
printf "Installing PyTorch with %s\n" "${cudatoolkit}" printf "Installing PyTorch with %s\n" "${cudatoolkit}"
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" pytorch "${cudatoolkit}" conda install ${CONDA_CHANNEL_FLAGS:-} -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}::pytorch" ${cudatoolkit}
# 2. Install torchaudio # 2. Install torchaudio
printf "* Installing torchaudio\n" printf "* Installing torchaudio\n"
...@@ -33,5 +33,15 @@ python setup.py install ...@@ -33,5 +33,15 @@ python setup.py install
# 3. Install Test tools # 3. Install Test tools
printf "* Installing test tools\n" printf "* Installing test tools\n"
conda install -y -c conda-forge codecov pytest pytest-cov NUMBA_DEV_CHANNEL=""
pip install kaldi-io 'librosa>=0.8.0' parameterized PySoundFile scipy if [[ "$(python --version)" = *3.9* ]]; then
# Numba isn't available for Python 3.9 except on the numba dev channel and building from source fails
# See https://github.com/librosa/librosa/issues/1270#issuecomment-759065048
NUMBA_DEV_CHANNEL="-c numba/label/dev"
fi
# Note: installing librosa via pip fail because it will try to compile numba.
(
set -x
conda install -y -c conda-forge ${NUMBA_DEV_CHANNEL} 'librosa>=0.8.0' parameterized 'requests>=2.20'
pip install kaldi-io SoundFile codecov pytest pytest-cov scipy
)
...@@ -37,3 +37,9 @@ if [ ! -d "${env_dir}" ]; then ...@@ -37,3 +37,9 @@ if [ ! -d "${env_dir}" ]; then
conda create --prefix "${env_dir}" -y python="${PYTHON_VERSION}" conda create --prefix "${env_dir}" -y python="${PYTHON_VERSION}"
fi fi
conda activate "${env_dir}" conda activate "${env_dir}"
NUMPY_PIN="1.11"
if [[ "${PYTHON_VERSION}" = "3.9" ]]; then
NUMPY_PIN="1.20"
fi
printf "* Installing numpy>=%s\n" "${NUMPY_PIN}\n"
conda install -y -c conda-forge numpy>="${NUMPY_PIN}"
...@@ -141,6 +141,7 @@ setup_wheel_python() { ...@@ -141,6 +141,7 @@ setup_wheel_python() {
3.6) python_abi=cp36-cp36m ;; 3.6) python_abi=cp36-cp36m ;;
3.7) python_abi=cp37-cp37m ;; 3.7) python_abi=cp37-cp37m ;;
3.8) python_abi=cp38-cp38 ;; 3.8) python_abi=cp38-cp38 ;;
3.9) python_abi=cp39-cp39 ;;
*) *)
echo "Unrecognized PYTHON_VERSION=$PYTHON_VERSION" echo "Unrecognized PYTHON_VERSION=$PYTHON_VERSION"
exit 1 exit 1
...@@ -176,11 +177,16 @@ setup_pip_pytorch_version() { ...@@ -176,11 +177,16 @@ setup_pip_pytorch_version() {
# #
# You MUST have populated PYTORCH_VERSION_SUFFIX before hand. # You MUST have populated PYTORCH_VERSION_SUFFIX before hand.
setup_conda_pytorch_constraint() { setup_conda_pytorch_constraint() {
CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS}"
if [[ -z "$PYTORCH_VERSION" ]]; then if [[ -z "$PYTORCH_VERSION" ]]; then
export CONDA_CHANNEL_FLAGS="-c pytorch-nightly" export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch-nightly"
export PYTORCH_VERSION="$(conda search --json 'pytorch[channel=pytorch-nightly]' | python -c "import sys, json, re; print(re.sub(r'\\+.*$', '', json.load(sys.stdin)['pytorch'][-1]['version']))")" export PYTORCH_VERSION="$(conda search --json 'pytorch[channel=pytorch-nightly]' | python -c "import sys, json, re; print(re.sub(r'\\+.*$', '', json.load(sys.stdin)['pytorch'][-1]['version']))")"
else else
export CONDA_CHANNEL_FLAGS="-c pytorch -c pytorch-${UPLOAD_CHANNEL}" export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch -c pytorch-test -c pytorch-nightly"
fi
# Some dependencies for Python 3.9 are only on conda-forge
if [[ "${PYTHON_VERSION}" = "3.9" ]]; then
export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c conda-forge"
fi fi
if [[ "$CU_VERSION" == cpu ]]; then if [[ "$CU_VERSION" == cpu ]]; then
export CONDA_PYTORCH_BUILD_CONSTRAINT="- pytorch==$PYTORCH_VERSION${PYTORCH_VERSION_SUFFIX}" export CONDA_PYTORCH_BUILD_CONSTRAINT="- pytorch==$PYTORCH_VERSION${PYTORCH_VERSION_SUFFIX}"
......
...@@ -16,10 +16,12 @@ requirements: ...@@ -16,10 +16,12 @@ requirements:
- cpuonly - cpuonly
- cmake - cmake
- ninja - ninja
- defaults::numpy >=1.11
{{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT') }} {{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT') }}
run: run:
- python - python
- defaults::numpy >=1.11
{{ environ.get('CONDA_PYTORCH_CONSTRAINT') }} {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }}
build: build:
......
...@@ -76,6 +76,7 @@ setup( ...@@ -76,6 +76,7 @@ setup(
"Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: CPython",
"Topic :: Multimedia :: Sound/Audio", "Topic :: Multimedia :: Sound/Audio",
"Topic :: Scientific/Engineering :: Artificial Intelligence" "Topic :: Scientific/Engineering :: Artificial Intelligence"
......
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