Commit e663095c authored by atalman's avatar atalman Committed by Facebook GitHub Bot
Browse files

Add py3.11 to windows nightly conda (#3071)

Summary:
Same as: https://github.com/pytorch/vision/pull/7263

Pull Request resolved: https://github.com/pytorch/audio/pull/3071

Reviewed By: weiwangmeta

Differential Revision: D43377741

Pulled By: atalman

fbshipit-source-id: 0dbe0aaa10b9a4bad713563e98642b1a65e9ac07
parent 06b1cc9d
...@@ -533,7 +533,10 @@ jobs: ...@@ -533,7 +533,10 @@ jobs:
conda env remove -n python${PYTHON_VERSION} || true conda env remove -n python${PYTHON_VERSION} || true
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION} conda activate python${PYTHON_VERSION}
conda install -v -y -c pytorch-${UPLOAD_CHANNEL} pytorch cpuonly if [[ "${PYTHON_VERSION}" == "3.11" ]]; then
export CONDA_CHANNEL_FLAGS=" -c malfet"
fi
conda install -v -y ${CONDA_CHANNEL_FLAGS:-} -c pytorch-${UPLOAD_CHANNEL} pytorch cpuonly
conda install -v -y $(ls ~/workspace/conda-bld/win-64/torchaudio*.tar.bz2) conda install -v -y $(ls ~/workspace/conda-bld/win-64/torchaudio*.tar.bz2)
- checkout - checkout
- run: - run:
...@@ -541,7 +544,11 @@ jobs: ...@@ -541,7 +544,11 @@ jobs:
command: | command: |
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda activate python${PYTHON_VERSION} conda activate python${PYTHON_VERSION}
if [[ "${PYTHON_VERSION}" == "3.11" ]]; then
conda install -c conda-forge ffmpeg=4.4.2
else
conda install 'ffmpeg<5' conda install 'ffmpeg<5'
fi
./test/smoke_test/run_smoke_test.sh ./test/smoke_test/run_smoke_test.sh
smoke_test_windows_conda_gpu: smoke_test_windows_conda_gpu:
...@@ -569,11 +576,14 @@ jobs: ...@@ -569,11 +576,14 @@ jobs:
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION} conda activate python${PYTHON_VERSION}
# Include numpy and cudatoolkit in the install conda-forge chanell is used for cudatoolkit # Include numpy and cudatoolkit in the install conda-forge chanell is used for cudatoolkit
if [[ "${PYTHON_VERSION}" == "3.11" ]]; then
export CONDA_CHANNEL_FLAGS=" -c malfet"
fi
if [[ "$CU_VERSION" == cu116 || "$CU_VERSION" == cu117 || "$CU_VERSION" == cu118 ]]; then if [[ "$CU_VERSION" == cu116 || "$CU_VERSION" == cu117 || "$CU_VERSION" == cu118 ]]; then
conda install -v -y -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch numpy ffmpeg pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4} conda install -v -y ${CONDA_CHANNEL_FLAGS:-} -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch numpy ffmpeg pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4}
else else
conda install -v -y -c pytorch-${UPLOAD_CHANNEL} pytorch numpy ffmpeg cudatoolkit=${CU_VERSION:2:2}.${CU_VERSION:4} conda install -v -y ${CONDA_CHANNEL_FLAGS:-} -c pytorch-${UPLOAD_CHANNEL} pytorch numpy ffmpeg cudatoolkit=${CU_VERSION:2:2}.${CU_VERSION:4}
fi fi
# Install from torchaudio file # Install from torchaudio file
conda install -v -y $(ls ~/workspace/conda-bld/win-64/torchaudio*.tar.bz2) conda install -v -y $(ls ~/workspace/conda-bld/win-64/torchaudio*.tar.bz2)
...@@ -584,7 +594,6 @@ jobs: ...@@ -584,7 +594,6 @@ jobs:
conda activate python${PYTHON_VERSION} conda activate python${PYTHON_VERSION}
# Install sound backend # Install sound backend
pip install PySoundFile pip install PySoundFile
# conda install 'ffmpeg<5'
./test/smoke_test/run_smoke_test.sh ./test/smoke_test/run_smoke_test.sh
smoke_test_windows_pip: smoke_test_windows_pip:
...@@ -1220,6 +1229,45 @@ workflows: ...@@ -1220,6 +1229,45 @@ workflows:
python_version: '3.10' python_version: '3.10'
requires: requires:
- binary_windows_conda_py3.10_cu118 - binary_windows_conda_py3.10_cu118
- binary_windows_conda:
conda_docker_image: pytorch/conda-builder:cpu
cuda_version: cpu
name: binary_windows_conda_py3.11_cpu
python_version: '3.11'
requires:
- build_ffmpeg_windows
- smoke_test_windows_conda:
cuda_version: cpu
name: binary_windows_conda_py3.11_cpu_smoke_test_conda
python_version: '3.11'
requires:
- binary_windows_conda_py3.11_cpu
- binary_windows_conda:
conda_docker_image: pytorch/conda-builder:cuda117
cuda_version: cu117
name: binary_windows_conda_py3.11_cu117
python_version: '3.11'
requires:
- build_ffmpeg_windows
- smoke_test_windows_conda_gpu:
cuda_version: cu117
name: binary_windows_conda_py3.11_cu117_smoke_test_conda
python_version: '3.11'
requires:
- binary_windows_conda_py3.11_cu117
- binary_windows_conda:
conda_docker_image: pytorch/conda-builder:cuda118
cuda_version: cu118
name: binary_windows_conda_py3.11_cu118
python_version: '3.11'
requires:
- build_ffmpeg_windows
- smoke_test_windows_conda_gpu:
cuda_version: cu118
name: binary_windows_conda_py3.11_cu118_smoke_test_conda
python_version: '3.11'
requires:
- binary_windows_conda_py3.11_cu118
- build_docs: - build_docs:
cuda_version: cu117 cuda_version: cu117
filters: filters:
...@@ -2154,3 +2202,111 @@ workflows: ...@@ -2154,3 +2202,111 @@ workflows:
python_version: '3.10' python_version: '3.10'
requires: requires:
- nightly_binary_windows_conda_py3.10_cu118 - nightly_binary_windows_conda_py3.10_cu118
- binary_windows_conda:
conda_docker_image: pytorch/conda-builder:cpu
cuda_version: cpu
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_windows_conda_py3.11_cpu
python_version: '3.11'
requires:
- build_ffmpeg_windows
- 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.11_cpu_upload
requires:
- nightly_binary_windows_conda_py3.11_cpu
- smoke_test_windows_conda:
cuda_version: cpu
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_windows_conda_py3.11_cpu_smoke_test_conda
python_version: '3.11'
requires:
- nightly_binary_windows_conda_py3.11_cpu
- binary_windows_conda:
conda_docker_image: pytorch/conda-builder:cuda117
cuda_version: cu117
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_windows_conda_py3.11_cu117
python_version: '3.11'
requires:
- build_ffmpeg_windows
- 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.11_cu117_upload
requires:
- nightly_binary_windows_conda_py3.11_cu117
- smoke_test_windows_conda_gpu:
cuda_version: cu117
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_windows_conda_py3.11_cu117_smoke_test_conda
python_version: '3.11'
requires:
- nightly_binary_windows_conda_py3.11_cu117
- binary_windows_conda:
conda_docker_image: pytorch/conda-builder:cuda118
cuda_version: cu118
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_windows_conda_py3.11_cu118
python_version: '3.11'
requires:
- build_ffmpeg_windows
- 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.11_cu118_upload
requires:
- nightly_binary_windows_conda_py3.11_cu118
- smoke_test_windows_conda_gpu:
cuda_version: cu118
filters:
branches:
only:
- nightly
tags:
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name: nightly_binary_windows_conda_py3.11_cu118_smoke_test_conda
python_version: '3.11'
requires:
- nightly_binary_windows_conda_py3.11_cu118
...@@ -533,7 +533,10 @@ jobs: ...@@ -533,7 +533,10 @@ jobs:
conda env remove -n python${PYTHON_VERSION} || true conda env remove -n python${PYTHON_VERSION} || true
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION} conda activate python${PYTHON_VERSION}
conda install -v -y -c pytorch-${UPLOAD_CHANNEL} pytorch cpuonly if [[ "${PYTHON_VERSION}" == "3.11" ]]; then
export CONDA_CHANNEL_FLAGS=" -c malfet"
fi
conda install -v -y ${CONDA_CHANNEL_FLAGS:-} -c pytorch-${UPLOAD_CHANNEL} pytorch cpuonly
conda install -v -y $(ls ~/workspace/conda-bld/win-64/torchaudio*.tar.bz2) conda install -v -y $(ls ~/workspace/conda-bld/win-64/torchaudio*.tar.bz2)
- checkout - checkout
- run: - run:
...@@ -541,7 +544,11 @@ jobs: ...@@ -541,7 +544,11 @@ jobs:
command: | command: |
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda activate python${PYTHON_VERSION} conda activate python${PYTHON_VERSION}
if [[ "${PYTHON_VERSION}" == "3.11" ]]; then
conda install -c conda-forge ffmpeg=4.4.2
else
conda install 'ffmpeg<5' conda install 'ffmpeg<5'
fi
./test/smoke_test/run_smoke_test.sh ./test/smoke_test/run_smoke_test.sh
smoke_test_windows_conda_gpu: smoke_test_windows_conda_gpu:
...@@ -569,11 +576,14 @@ jobs: ...@@ -569,11 +576,14 @@ jobs:
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION} conda activate python${PYTHON_VERSION}
# Include numpy and cudatoolkit in the install conda-forge chanell is used for cudatoolkit # Include numpy and cudatoolkit in the install conda-forge chanell is used for cudatoolkit
if [[ "${PYTHON_VERSION}" == "3.11" ]]; then
export CONDA_CHANNEL_FLAGS=" -c malfet"
fi
if [[ "$CU_VERSION" == cu116 || "$CU_VERSION" == cu117 || "$CU_VERSION" == cu118 ]]; then if [[ "$CU_VERSION" == cu116 || "$CU_VERSION" == cu117 || "$CU_VERSION" == cu118 ]]; then
conda install -v -y -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch numpy ffmpeg pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4} conda install -v -y ${CONDA_CHANNEL_FLAGS:-} -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch numpy ffmpeg pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4}
else else
conda install -v -y -c pytorch-${UPLOAD_CHANNEL} pytorch numpy ffmpeg cudatoolkit=${CU_VERSION:2:2}.${CU_VERSION:4} conda install -v -y ${CONDA_CHANNEL_FLAGS:-} -c pytorch-${UPLOAD_CHANNEL} pytorch numpy ffmpeg cudatoolkit=${CU_VERSION:2:2}.${CU_VERSION:4}
fi fi
# Install from torchaudio file # Install from torchaudio file
conda install -v -y $(ls ~/workspace/conda-bld/win-64/torchaudio*.tar.bz2) conda install -v -y $(ls ~/workspace/conda-bld/win-64/torchaudio*.tar.bz2)
...@@ -584,7 +594,6 @@ jobs: ...@@ -584,7 +594,6 @@ jobs:
conda activate python${PYTHON_VERSION} conda activate python${PYTHON_VERSION}
# Install sound backend # Install sound backend
pip install PySoundFile pip install PySoundFile
# conda install 'ffmpeg<5'
./test/smoke_test/run_smoke_test.sh ./test/smoke_test/run_smoke_test.sh
smoke_test_windows_pip: smoke_test_windows_pip:
......
...@@ -64,13 +64,6 @@ def build_workflows(prefix="", upload=False, filter_branch=None, indentation=6): ...@@ -64,13 +64,6 @@ def build_workflows(prefix="", upload=False, filter_branch=None, indentation=6):
w += build_workflow_pair(btype, os_type, python_version, cu_version, fb, prefix, False) w += build_workflow_pair(btype, os_type, python_version, cu_version, fb, prefix, False)
continue continue
# Not supporting Python 3.11 conda packages at the
# moment since the necessary dependencies are not
# available. Windows 3.11 Wheels will be built from
# CircleCI here, however.
if python_version == "3.11" and btype == "conda":
continue
w += build_workflow_pair(btype, os_type, python_version, cu_version, fb, prefix, upload) w += build_workflow_pair(btype, os_type, python_version, cu_version, fb, prefix, upload)
if not filter_branch: if not filter_branch:
......
...@@ -18,4 +18,9 @@ export CUDATOOLKIT_CHANNEL="nvidia" ...@@ -18,4 +18,9 @@ export CUDATOOLKIT_CHANNEL="nvidia"
if [[ ${OSTYPE} =~ darwin* ]] && [[ ${PYTHON_VERSION} = "3.10" ]]; then if [[ ${OSTYPE} =~ darwin* ]] && [[ ${PYTHON_VERSION} = "3.10" ]]; then
CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c conda-forge" CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c conda-forge"
fi fi
conda build -c defaults -c $CUDATOOLKIT_CHANNEL ${CONDA_CHANNEL_FLAGS:-} --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchaudio
if [[ "$PYTHON_VERSION" == "3.11" ]]; then
export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c malfet"
fi
conda build -c defaults -c $CUDATOOLKIT_CHANNEL ${CONDA_CHANNEL_FLAGS:-} --no-anaconda-upload --no-test --python "$PYTHON_VERSION" packaging/torchaudio
...@@ -232,7 +232,7 @@ setup_conda_pytorch_constraint() { ...@@ -232,7 +232,7 @@ setup_conda_pytorch_constraint() {
# TODO: Remove me later, see https://github.com/pytorch/pytorch/issues/62424 for more details # TODO: Remove me later, see https://github.com/pytorch/pytorch/issues/62424 for more details
if [[ "$(uname)" == Darwin ]]; then if [[ "$(uname)" == Darwin ]]; then
arch_name="$(uname -m)" arch_name="$(uname -m)"
if [ "${arch_name}" != "arm64" ]; then if [[ "${arch_name}" != "arm64" && "${PYTHON_VERSION}" != "3.11" ]]; then
# Use less than equal to avoid version conflict in python=3.6 environment # Use less than equal to avoid version conflict in python=3.6 environment
export CONDA_EXTRA_BUILD_CONSTRAINT="- mkl<=2021.2.0" export CONDA_EXTRA_BUILD_CONSTRAINT="- mkl<=2021.2.0"
fi fi
......
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