diff --git a/.circleci/config.yml b/.circleci/config.yml index 707887ade2..803a3428c8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -477,11 +477,7 @@ jobs: command: | set -x source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - if [[ "$CU_VERSION" == cu116 || "$CU_VERSION" == cu117 || "$CU_VERSION" == cu118 ]]; then - conda install -v -y -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4} - else - conda install -v -y -c pytorch-${UPLOAD_CHANNEL} pytorch cudatoolkit=${CU_VERSION:2:2}.${CU_VERSION:4} - fi + conda install -v -y -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4} conda install -v -y -c file://$HOME/workspace/conda-bld torchaudio - checkout - run: @@ -532,9 +528,6 @@ jobs: conda env remove -n python${PYTHON_VERSION} || true conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} - 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 @@ -574,16 +567,8 @@ jobs: conda env remove -n python${PYTHON_VERSION} || true 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 + 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} - if [[ "$CU_VERSION" == cu116 || "$CU_VERSION" == cu117 || "$CU_VERSION" == cu118 ]]; then - 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 ${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) - run: @@ -852,11 +837,7 @@ jobs: command: | set -x source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - if [[ "$CU_VERSION" == cu116 || "$CU_VERSION" == cu117 || "$CU_VERSION" == cu118 ]]; then - conda install -v -y -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4} - else - conda install -v -y -c pytorch-${UPLOAD_CHANNEL} pytorch cudatoolkit=${CU_VERSION:2:2}.${CU_VERSION:4} - fi + conda install -v -y -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4} conda install -v -y -c file://$HOME/workspace/conda-bld torchaudio # gxx_linux-64 is for installing pesq library that depends on cython conda install -y pandoc 'ffmpeg<5' gxx_linux-64 git make diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index 33adb15fa4..a3bbdfb307 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -477,11 +477,7 @@ jobs: command: | set -x source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - if [[ "$CU_VERSION" == cu116 || "$CU_VERSION" == cu117 || "$CU_VERSION" == cu118 ]]; then - conda install -v -y -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4} - else - conda install -v -y -c pytorch-${UPLOAD_CHANNEL} pytorch cudatoolkit=${CU_VERSION:2:2}.${CU_VERSION:4} - fi + conda install -v -y -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4} conda install -v -y -c file://$HOME/workspace/conda-bld torchaudio - checkout - run: @@ -532,9 +528,6 @@ jobs: conda env remove -n python${PYTHON_VERSION} || true conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} - 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 @@ -574,16 +567,8 @@ jobs: conda env remove -n python${PYTHON_VERSION} || true 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 + 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} - if [[ "$CU_VERSION" == cu116 || "$CU_VERSION" == cu117 || "$CU_VERSION" == cu118 ]]; then - 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 ${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) - run: @@ -852,11 +837,7 @@ jobs: command: | set -x source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - if [[ "$CU_VERSION" == cu116 || "$CU_VERSION" == cu117 || "$CU_VERSION" == cu118 ]]; then - conda install -v -y -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4} - else - conda install -v -y -c pytorch-${UPLOAD_CHANNEL} pytorch cudatoolkit=${CU_VERSION:2:2}.${CU_VERSION:4} - fi + conda install -v -y -c pytorch-${UPLOAD_CHANNEL} -c nvidia pytorch pytorch-cuda=${CU_VERSION:2:2}.${CU_VERSION:4} conda install -v -y -c file://$HOME/workspace/conda-bld torchaudio # gxx_linux-64 is for installing pesq library that depends on cython conda install -y pandoc 'ffmpeg<5' gxx_linux-64 git make diff --git a/.circleci/unittest/windows/scripts/install.sh b/.circleci/unittest/windows/scripts/install.sh index 55521e932d..7ac0fd6630 100644 --- a/.circleci/unittest/windows/scripts/install.sh +++ b/.circleci/unittest/windows/scripts/install.sh @@ -26,13 +26,7 @@ if [ -z "${CUDA_VERSION:-}" ] ; then version="cpu" else version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" - - cuda_toolkit_pckg="cudatoolkit" - if [[ "$CU_VERSION" == cu116 || "$CU_VERSION" == cu117 || "$CU_VERSION" == cu118 ]]; then - cuda_toolkit_pckg="pytorch-cuda" - fi - - cudatoolkit="${cuda_toolkit_pckg}=${version}" + cudatoolkit="pytorch-cuda=${version}" fi printf "Installing PyTorch with %s\n" "${cudatoolkit}" conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c nvidia pytorch "${cudatoolkit}" pytest diff --git a/.circleci/unittest/windows/scripts/set_cuda_envs.sh b/.circleci/unittest/windows/scripts/set_cuda_envs.sh index 37b53d020d..e2d014b27b 100644 --- a/.circleci/unittest/windows/scripts/set_cuda_envs.sh +++ b/.circleci/unittest/windows/scripts/set_cuda_envs.sh @@ -4,7 +4,7 @@ set -ex echo CU_VERSION is "${CU_VERSION}" echo CUDA_VERSION is "${CUDA_VERSION}" -# Currenly, CU_VERSION and CUDA_VERSION are not consistent. +# Currenly, CU_VERSION and CUDA_VERSION are not consistent. # to understand this code, please checck out https://github.com/pytorch/vision/issues/4443 version="cpu" if [[ ! -z "${CUDA_VERSION}" ]] ; then diff --git a/packaging/build_conda.sh b/packaging/build_conda.sh index 9a81b9cfe7..b3792b3573 100755 --- a/packaging/build_conda.sh +++ b/packaging/build_conda.sh @@ -19,8 +19,4 @@ if [[ ${OSTYPE} =~ darwin* ]] && [[ ${PYTHON_VERSION} = "3.10" ]]; then CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c conda-forge" fi -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