Skip to content

Commit

Permalink
Add py3.11 to windows nightly conda (pytorch#3071)
Browse files Browse the repository at this point in the history
Summary:
Same as: pytorch/vision#7263

Pull Request resolved: pytorch#3071

Reviewed By: weiwangmeta

Differential Revision: D43377741

Pulled By: atalman

fbshipit-source-id: 0dbe0aaa10b9a4bad713563e98642b1a65e9ac07
  • Loading branch information
atalman authored and facebook-github-bot committed Feb 17, 2023
1 parent 06b1cc9 commit e663095
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 19 deletions.
166 changes: 161 additions & 5 deletions .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 14 additions & 5 deletions .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -533,15 +533,22 @@ jobs:
conda env remove -n python${PYTHON_VERSION} || true
conda create -yn python${PYTHON_VERSION} 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)
- checkout
- run:
name: smoke test
command: |
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda activate python${PYTHON_VERSION}
conda install 'ffmpeg<5'
if [[ "${PYTHON_VERSION}" == "3.11" ]]; then
conda install -c conda-forge ffmpeg=4.4.2
else
conda install 'ffmpeg<5'
fi
./test/smoke_test/run_smoke_test.sh

smoke_test_windows_conda_gpu:
Expand Down Expand Up @@ -569,11 +576,14 @@ jobs:
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION}
# 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
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
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
# Install from torchaudio file
conda install -v -y $(ls ~/workspace/conda-bld/win-64/torchaudio*.tar.bz2)
Expand All @@ -584,7 +594,6 @@ jobs:
conda activate python${PYTHON_VERSION}
# Install sound backend
pip install PySoundFile
# conda install 'ffmpeg<5'
./test/smoke_test/run_smoke_test.sh

smoke_test_windows_pip:
Expand Down
7 changes: 0 additions & 7 deletions .circleci/regenerate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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)

if not filter_branch:
Expand Down
7 changes: 6 additions & 1 deletion packaging/build_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@ export CUDATOOLKIT_CHANNEL="nvidia"
if [[ ${OSTYPE} =~ darwin* ]] && [[ ${PYTHON_VERSION} = "3.10" ]]; then
CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c conda-forge"
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
2 changes: 1 addition & 1 deletion packaging/pkg_helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ setup_conda_pytorch_constraint() {
# TODO: Remove me later, see https://github.com/pytorch/pytorch/issues/62424 for more details
if [[ "$(uname)" == Darwin ]]; then
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
export CONDA_EXTRA_BUILD_CONSTRAINT="- mkl<=2021.2.0"
fi
Expand Down

0 comments on commit e663095

Please sign in to comment.