diff --git a/.circleci/config.yml b/.circleci/config.yml index d378b3a9922..cf9d77d115e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -48,11 +48,11 @@ binary_common: &binary_common build_version: description: "version number of release binary; by default, build a nightly" type: string - default: "0.8.0" + default: "0.8.2" pytorch_version: description: "PyTorch version to build against; by default, use a nightly" type: string - default: "1.7.0" + default: "1.7.1" # Don't edit these python_version: description: "Python version to build against (e.g., 3.7)" @@ -368,7 +368,11 @@ jobs: set -x eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" conda env remove -n python${PYTHON_VERSION} || true - conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} + CONDA_CHANNEL_FLAGS="" + if [[ "${PYTHON_VERSION}" = 3.9 ]]; then + CONDA_CHANNEL_FLAGS="-c=conda-forge" + fi + conda create ${CONDA_CHANNEL_FLAGS} -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} conda install Pillow conda install -v -y -c pytorch-nightly pytorch @@ -393,7 +397,11 @@ jobs: command: | set -x eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" - conda env remove -n python${PYTHON_VERSION} || true + CONDA_CHANNEL_FLAGS="" + if [[ "${PYTHON_VERSION}" = 3.9 ]]; then + CONDA_CHANNEL_FLAGS="-c=conda-forge" + fi + conda create ${CONDA_CHANNEL_FLAGS} -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} pip install $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html @@ -464,7 +472,7 @@ jobs: - run: name: Setup - command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh + command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e PYTHON_VERSION "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh - save_cache: key: env-v2-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} @@ -474,7 +482,7 @@ jobs: - env - run: name: Install torchvision - command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e UPLOAD_CHANNEL "${image_name}" .circleci/unittest/linux/scripts/install.sh + command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e UPLOAD_CHANNEL -e CU_VERSION "${image_name}" .circleci/unittest/linux/scripts/install.sh - run: name: Run tests command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh @@ -759,6 +767,31 @@ workflows: name: binary_linux_wheel_py3.8_cu110 python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda110 + - binary_linux_wheel: + cu_version: cpu + name: binary_linux_wheel_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - binary_linux_wheel: + cu_version: cu92 + name: binary_linux_wheel_py3.9_cu92 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda92 + - binary_linux_wheel: + cu_version: cu101 + name: binary_linux_wheel_py3.9_cu101 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda101 + - binary_linux_wheel: + cu_version: cu102 + name: binary_linux_wheel_py3.9_cu102 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - binary_linux_wheel: + cu_version: cu110 + name: binary_linux_wheel_py3.9_cu110 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda110 - binary_macos_wheel: cu_version: cpu name: binary_macos_wheel_py3.6_cpu @@ -774,6 +807,11 @@ workflows: name: binary_macos_wheel_py3.8_cpu python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda102 + - binary_macos_wheel: + cu_version: cpu + name: binary_macos_wheel_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 - binary_win_wheel: cu_version: cpu filters: @@ -848,6 +886,11 @@ workflows: python_version: '3.7' - binary_win_wheel: cu_version: cpu + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.8_cpu python_version: '3.8' - binary_win_wheel: @@ -870,8 +913,39 @@ workflows: python_version: '3.8' - binary_win_wheel: cu_version: cu110 + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.8_cu110 python_version: '3.8' + - binary_win_wheel: + cu_version: cpu + name: binary_win_wheel_py3.9_cpu + python_version: '3.9' + - binary_win_wheel: + cu_version: cu101 + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.9_cu101 + python_version: '3.9' + - binary_win_wheel: + cu_version: cu102 + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.9_cu102 + python_version: '3.9' + - binary_win_wheel: + cu_version: cu110 + name: binary_win_wheel_py3.9_cu110 + python_version: '3.9' - binary_linux_conda: cu_version: cpu name: binary_linux_conda_py3.6_cpu @@ -947,6 +1021,31 @@ workflows: name: binary_linux_conda_py3.8_cu110 python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda110 + - binary_linux_conda: + cu_version: cpu + name: binary_linux_conda_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - binary_linux_conda: + cu_version: cu92 + name: binary_linux_conda_py3.9_cu92 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda92 + - binary_linux_conda: + cu_version: cu101 + name: binary_linux_conda_py3.9_cu101 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda101 + - binary_linux_conda: + cu_version: cu102 + name: binary_linux_conda_py3.9_cu102 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - binary_linux_conda: + cu_version: cu110 + name: binary_linux_conda_py3.9_cu110 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda110 - binary_macos_conda: cu_version: cpu name: binary_macos_conda_py3.6_cpu @@ -962,6 +1061,11 @@ workflows: name: binary_macos_conda_py3.8_cpu python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda102 + - binary_macos_conda: + cu_version: cpu + name: binary_macos_conda_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 - binary_win_conda: cu_version: cpu filters: @@ -1036,6 +1140,11 @@ workflows: python_version: '3.7' - binary_win_conda: cu_version: cpu + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.8_cpu python_version: '3.8' - binary_win_conda: @@ -1058,8 +1167,39 @@ workflows: python_version: '3.8' - binary_win_conda: cu_version: cu110 + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.8_cu110 python_version: '3.8' + - binary_win_conda: + cu_version: cpu + name: binary_win_conda_py3.9_cpu + python_version: '3.9' + - binary_win_conda: + cu_version: cu101 + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.9_cu101 + python_version: '3.9' + - binary_win_conda: + cu_version: cu102 + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.9_cu102 + python_version: '3.9' + - binary_win_conda: + cu_version: cu110 + name: binary_win_conda_py3.9_cu110 + python_version: '3.9' - python_lint - python_type_check - clang_format @@ -1078,6 +1218,10 @@ workflows: cu_version: cpu name: unittest_linux_cpu_py3.8 python_version: '3.8' + - unittest_linux_cpu: + cu_version: cpu + name: unittest_linux_cpu_py3.9 + python_version: '3.9' - unittest_linux_gpu: cu_version: cu101 filters: @@ -1100,6 +1244,15 @@ workflows: cu_version: cu101 name: unittest_linux_gpu_py3.8 python_version: '3.8' + - unittest_linux_gpu: + cu_version: cu101 + filters: + branches: + only: + - master + - nightly + name: unittest_linux_gpu_py3.9 + python_version: '3.9' - unittest_windows_cpu: cu_version: cpu name: unittest_windows_cpu_py3.6 @@ -1112,6 +1265,10 @@ workflows: cu_version: cpu name: unittest_windows_cpu_py3.8 python_version: '3.8' + - unittest_windows_cpu: + cu_version: cpu + name: unittest_windows_cpu_py3.9 + python_version: '3.9' - unittest_windows_gpu: cu_version: cu101 filters: @@ -1134,6 +1291,15 @@ workflows: cu_version: cu101 name: unittest_windows_gpu_py3.8 python_version: '3.8' + - unittest_windows_gpu: + cu_version: cu101 + filters: + branches: + only: + - master + - nightly + name: unittest_windows_gpu_py3.9 + python_version: '3.9' - unittest_macos_cpu: cu_version: cpu name: unittest_macos_cpu_py3.6 @@ -1146,6 +1312,10 @@ workflows: cu_version: cpu name: unittest_macos_cpu_py3.8 python_version: '3.8' + - unittest_macos_cpu: + cu_version: cpu + name: unittest_macos_cpu_py3.9 + python_version: '3.9' cmake: jobs: @@ -1627,6 +1797,156 @@ workflows: python_version: '3.8' requires: - nightly_binary_linux_wheel_py3.8_cu110_upload + - binary_linux_wheel: + cu_version: cpu + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_wheel_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - 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_cpu_upload + requires: + - nightly_binary_linux_wheel_py3.9_cpu + subfolder: cpu/ + - smoke_test_linux_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_wheel_py3.9_cpu_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_linux_wheel_py3.9_cpu_upload + - binary_linux_wheel: + cu_version: cu92 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_wheel_py3.9_cu92 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda92 + - 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_cu92_upload + requires: + - nightly_binary_linux_wheel_py3.9_cu92 + subfolder: cu92/ + - smoke_test_linux_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_wheel_py3.9_cu92_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_linux_wheel_py3.9_cu92_upload + - binary_linux_wheel: + cu_version: cu101 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_wheel_py3.9_cu101 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda101 + - 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_cu101_upload + requires: + - nightly_binary_linux_wheel_py3.9_cu101 + subfolder: cu101/ + - smoke_test_linux_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_wheel_py3.9_cu101_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_linux_wheel_py3.9_cu101_upload + - binary_linux_wheel: + cu_version: cu102 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_wheel_py3.9_cu102 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - 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_cu102_upload + requires: + - nightly_binary_linux_wheel_py3.9_cu102 + subfolder: cu102/ + - smoke_test_linux_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_wheel_py3.9_cu102_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_linux_wheel_py3.9_cu102_upload + - binary_linux_wheel: + cu_version: cu110 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_wheel_py3.9_cu110 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda110 + - 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_cu110_upload + requires: + - nightly_binary_linux_wheel_py3.9_cu110 + subfolder: cu110/ + - smoke_test_linux_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_wheel_py3.9_cu110_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_linux_wheel_py3.9_cu110_upload - binary_macos_wheel: cu_version: cpu filters: @@ -1690,6 +2010,27 @@ workflows: requires: - nightly_binary_macos_wheel_py3.8_cpu subfolder: '' + - binary_macos_wheel: + cu_version: cpu + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_macos_wheel_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - 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_cpu_upload + requires: + - nightly_binary_macos_wheel_py3.9_cpu + subfolder: '' - binary_win_wheel: cu_version: cpu filters: @@ -2038,27 +2379,143 @@ workflows: python_version: '3.8' requires: - nightly_binary_win_wheel_py3.8_cu110_upload - - binary_linux_conda: + - binary_win_wheel: cu_version: cpu filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.6_cpu - python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda102 - - binary_conda_upload: + name: nightly_binary_win_wheel_py3.9_cpu + 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_linux_conda_py3.6_cpu_upload + name: nightly_binary_win_wheel_py3.9_cpu_upload requires: - - nightly_binary_linux_conda_py3.6_cpu - - smoke_test_linux_conda: + - nightly_binary_win_wheel_py3.9_cpu + subfolder: cpu/ + - smoke_test_win_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_win_wheel_py3.9_cpu_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_win_wheel_py3.9_cpu_upload + - binary_win_wheel: + cu_version: cu101 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.9_cu101 + 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_win_wheel_py3.9_cu101_upload + requires: + - nightly_binary_win_wheel_py3.9_cu101 + subfolder: cu101/ + - smoke_test_win_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_win_wheel_py3.9_cu101_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_win_wheel_py3.9_cu101_upload + - binary_win_wheel: + cu_version: cu102 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.9_cu102 + 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_win_wheel_py3.9_cu102_upload + requires: + - nightly_binary_win_wheel_py3.9_cu102 + subfolder: cu102/ + - smoke_test_win_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_win_wheel_py3.9_cu102_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_win_wheel_py3.9_cu102_upload + - binary_win_wheel: + cu_version: cu110 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.9_cu110 + 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_win_wheel_py3.9_cu110_upload + requires: + - nightly_binary_win_wheel_py3.9_cu110 + subfolder: cu110/ + - smoke_test_win_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_win_wheel_py3.9_cu110_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_win_wheel_py3.9_cu110_upload + - binary_linux_conda: + cu_version: cpu + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_conda_py3.6_cpu + python_version: '3.6' + wheel_docker_image: pytorch/manylinux-cuda102 + - 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.6_cpu_upload + requires: + - nightly_binary_linux_conda_py3.6_cpu + - smoke_test_linux_conda: filters: branches: only: @@ -2473,6 +2930,151 @@ workflows: python_version: '3.8' requires: - nightly_binary_linux_conda_py3.8_cu110_upload + - binary_linux_conda: + cu_version: cpu + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_conda_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - 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_cpu_upload + requires: + - nightly_binary_linux_conda_py3.9_cpu + - smoke_test_linux_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_conda_py3.9_cpu_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_linux_conda_py3.9_cpu_upload + - binary_linux_conda: + cu_version: cu92 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_conda_py3.9_cu92 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda92 + - 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_cu92_upload + requires: + - nightly_binary_linux_conda_py3.9_cu92 + - smoke_test_linux_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_conda_py3.9_cu92_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_linux_conda_py3.9_cu92_upload + - binary_linux_conda: + cu_version: cu101 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_conda_py3.9_cu101 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda101 + - 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_cu101_upload + requires: + - nightly_binary_linux_conda_py3.9_cu101 + - smoke_test_linux_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_conda_py3.9_cu101_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_linux_conda_py3.9_cu101_upload + - binary_linux_conda: + cu_version: cu102 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_conda_py3.9_cu102 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - 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_cu102_upload + requires: + - nightly_binary_linux_conda_py3.9_cu102 + - smoke_test_linux_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_conda_py3.9_cu102_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_linux_conda_py3.9_cu102_upload + - binary_linux_conda: + cu_version: cu110 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_conda_py3.9_cu110 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda110 + - 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_cu110_upload + requires: + - nightly_binary_linux_conda_py3.9_cu110 + - smoke_test_linux_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_conda_py3.9_cu110_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_linux_conda_py3.9_cu110_upload - binary_macos_conda: cu_version: cpu filters: @@ -2533,6 +3135,26 @@ workflows: name: nightly_binary_macos_conda_py3.8_cpu_upload requires: - nightly_binary_macos_conda_py3.8_cpu + - binary_macos_conda: + cu_version: cpu + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_macos_conda_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - 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_cpu_upload + requires: + - nightly_binary_macos_conda_py3.9_cpu - binary_win_conda: cu_version: cpu filters: @@ -2869,6 +3491,118 @@ workflows: python_version: '3.8' requires: - nightly_binary_win_conda_py3.8_cu110_upload + - binary_win_conda: + cu_version: cpu + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cpu + 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_win_conda_py3.9_cpu_upload + requires: + - nightly_binary_win_conda_py3.9_cpu + - smoke_test_win_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_win_conda_py3.9_cpu_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_win_conda_py3.9_cpu_upload + - binary_win_conda: + cu_version: cu101 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cu101 + 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_win_conda_py3.9_cu101_upload + requires: + - nightly_binary_win_conda_py3.9_cu101 + - smoke_test_win_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_win_conda_py3.9_cu101_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_win_conda_py3.9_cu101_upload + - binary_win_conda: + cu_version: cu102 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cu102 + 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_win_conda_py3.9_cu102_upload + requires: + - nightly_binary_win_conda_py3.9_cu102 + - smoke_test_win_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_win_conda_py3.9_cu102_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_win_conda_py3.9_cu102_upload + - binary_win_conda: + cu_version: cu110 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cu110 + 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_win_conda_py3.9_cu110_upload + requires: + - nightly_binary_win_conda_py3.9_cu110 + - smoke_test_win_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_win_conda_py3.9_cu110_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_win_conda_py3.9_cu110_upload docker_build: triggers: - schedule: diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index e6418ed7607..c9e85270d42 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -48,11 +48,11 @@ binary_common: &binary_common build_version: description: "version number of release binary; by default, build a nightly" type: string - default: "0.8.0" + default: "0.8.2" pytorch_version: description: "PyTorch version to build against; by default, use a nightly" type: string - default: "1.7.0" + default: "1.7.1" # Don't edit these python_version: description: "Python version to build against (e.g., 3.7)" @@ -368,7 +368,11 @@ jobs: set -x eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" conda env remove -n python${PYTHON_VERSION} || true - conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} + CONDA_CHANNEL_FLAGS="" + if [[ "${PYTHON_VERSION}" = 3.9 ]]; then + CONDA_CHANNEL_FLAGS="-c=conda-forge" + fi + conda create ${CONDA_CHANNEL_FLAGS} -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} conda install Pillow conda install -v -y -c pytorch-nightly pytorch @@ -393,7 +397,11 @@ jobs: command: | set -x eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" - conda env remove -n python${PYTHON_VERSION} || true + CONDA_CHANNEL_FLAGS="" + if [[ "${PYTHON_VERSION}" = 3.9 ]]; then + CONDA_CHANNEL_FLAGS="-c=conda-forge" + fi + conda create ${CONDA_CHANNEL_FLAGS} -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} pip install $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html @@ -464,7 +472,7 @@ jobs: {% endraw %} - run: name: Setup - command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh + command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e PYTHON_VERSION "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh - save_cache: {% raw %} key: env-v2-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} @@ -474,7 +482,7 @@ jobs: - env - run: name: Install torchvision - command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e UPLOAD_CHANNEL "${image_name}" .circleci/unittest/linux/scripts/install.sh + command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e UPLOAD_CHANNEL -e CU_VERSION "${image_name}" .circleci/unittest/linux/scripts/install.sh - run: name: Run tests command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 20847059f32..320c001c68e 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -19,7 +19,7 @@ import os.path -PYTHON_VERSIONS = ["3.6", "3.7", "3.8"] +PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] def build_workflows(prefix='', filter_branch=None, upload=False, indentation=6, windows_latest_only=False): diff --git a/.circleci/unittest/linux/scripts/environment.yml b/.circleci/unittest/linux/scripts/environment.yml index 87c7b3d1074..2a4f26360cd 100644 --- a/.circleci/unittest/linux/scripts/environment.yml +++ b/.circleci/unittest/linux/scripts/environment.yml @@ -1,6 +1,8 @@ channels: - pytorch - defaults + # using conda-forge for python v3.9+ + - conda-forge dependencies: - numpy - pytest @@ -8,10 +10,10 @@ dependencies: - codecov - pip - libpng - - jpeg + - jpeg <= 9b - ca-certificates + - av - pip: - future - pillow>=4.1.1 - scipy - - av \ No newline at end of file diff --git a/.circleci/unittest/linux/scripts/install.sh b/.circleci/unittest/linux/scripts/install.sh index 2de17f12744..1716fe35070 100755 --- a/.circleci/unittest/linux/scripts/install.sh +++ b/.circleci/unittest/linux/scripts/install.sh @@ -22,8 +22,14 @@ else version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" cudatoolkit="cudatoolkit=${version}" fi + +CONDA_CHANNEL_FLAGS="" +if [[ "$(python --version)" = *3.9* ]]; then + CONDA_CHANNEL_FLAGS="-c=conda-forge" +fi + printf "Installing PyTorch with %s\n" "${cudatoolkit}" -conda install -y -c "pytorch-${UPLOAD_CHANNEL}" pytorch "${cudatoolkit}" +conda install -y -c "pytorch-${UPLOAD_CHANNEL}" ${CONDA_CHANNEL_FLAGS} pytorch "${cudatoolkit}" printf "* Installing torchvision\n" python setup.py develop diff --git a/.circleci/unittest/linux/scripts/run_test.sh b/.circleci/unittest/linux/scripts/run_test.sh index 22877cd0aac..6d0959adb43 100755 --- a/.circleci/unittest/linux/scripts/run_test.sh +++ b/.circleci/unittest/linux/scripts/run_test.sh @@ -6,4 +6,4 @@ eval "$(./conda/bin/conda shell.bash hook)" conda activate ./env python -m torch.utils.collect_env -pytest --cov=torchvision --junitxml=test-results/junit.xml -v --durations 20 test --ignore=test/test_datasets_download.py \ No newline at end of file +pytest --cov=torchvision --junitxml=test-results/junit.xml -v --durations 20 test --ignore=test/test_datasets_download.py diff --git a/.circleci/unittest/windows/scripts/environment.yml b/.circleci/unittest/windows/scripts/environment.yml index 9f4348ebb26..66d62febec1 100644 --- a/.circleci/unittest/windows/scripts/environment.yml +++ b/.circleci/unittest/windows/scripts/environment.yml @@ -1,6 +1,8 @@ channels: - pytorch - defaults + # use conda-forge for python v3.9+ + - conda-forge dependencies: - numpy - pytest @@ -8,11 +10,11 @@ dependencies: - codecov - pip - libpng - - jpeg + - jpeg <= 9b - ca-certificates + - av - pip: - future - pillow>=4.1.1 - - scipy==1.4.1 - - av + - scipy>=1.4.1 - dataclasses diff --git a/.circleci/unittest/windows/scripts/install.sh b/.circleci/unittest/windows/scripts/install.sh index bdf2a869fe1..ca0518e0916 100644 --- a/.circleci/unittest/windows/scripts/install.sh +++ b/.circleci/unittest/windows/scripts/install.sh @@ -24,8 +24,14 @@ else version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" cudatoolkit="cudatoolkit=${version}" fi + +CONDA_CHANNEL_FLAGS="" +if [[ "$(python --version)" = *3.9* ]]; then + CONDA_CHANNEL_FLAGS="-c=conda-forge" +fi + printf "Installing PyTorch with %s\n" "${cudatoolkit}" -conda install -y -c "pytorch-${UPLOAD_CHANNEL}" pytorch "${cudatoolkit}" +conda install -y -c "pytorch-${UPLOAD_CHANNEL}" ${CONDA_CHANNEL_FLAGS} pytorch "${cudatoolkit}" printf "* Installing torchvision\n" "$this_dir/vc_env_helper.bat" python setup.py develop diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index 5d967cb18df..fafa5dc5cc5 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -179,10 +179,13 @@ setup_wheel_python() { if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then eval "$(conda shell.bash hook)" conda env remove -n "env$PYTHON_VERSION" || true - conda create -yn "env$PYTHON_VERSION" python="$PYTHON_VERSION" + if [[ "$PYTHON_VERSION" == 3.9 ]]; then + export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c=conda-forge" + fi + conda create ${CONDA_CHANNEL_FLAGS} -yn "env$PYTHON_VERSION" python="$PYTHON_VERSION" conda activate "env$PYTHON_VERSION" # Install libpng from Anaconda (defaults) - conda install libpng jpeg -y + conda install ${CONDA_CHANNEL_FLAGS} -c conda-forge libpng "jpeg<=9b" -y else # Install native CentOS libJPEG, LAME, freetype and GnuTLS yum install -y libjpeg-turbo-devel lame freetype gnutls @@ -198,6 +201,7 @@ setup_wheel_python() { 3.6) python_abi=cp36-cp36m ;; 3.7) python_abi=cp37-cp37m ;; 3.8) python_abi=cp38-cp38 ;; + 3.9) python_abi=cp39-cp39 ;; *) echo "Unrecognized PYTHON_VERSION=$PYTHON_VERSION" exit 1 @@ -272,6 +276,9 @@ setup_conda_pytorch_constraint() { if [[ "$OSTYPE" == msys && "$CU_VERSION" == cu92 ]]; then export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c defaults -c numba/label/dev" fi + if [[ "$PYTHON_VERSION" == 3.9 ]]; then + export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c=conda-forge" + fi } # Translate CUDA_VERSION into CUDA_CUDATOOLKIT_CONSTRAINT diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index a804a9d6cc1..1efb79214cf 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -9,7 +9,7 @@ requirements: build: - {{ compiler('c') }} # [win] - libpng - - jpeg + - jpeg <=9b host: - python @@ -21,7 +21,7 @@ requirements: run: - python - libpng - - jpeg + - jpeg <=9b - pillow >=4.1.1 - numpy >=1.11 {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }} @@ -48,7 +48,8 @@ test: requires: - pytest - scipy - - av =8.0.1 + - av >=8.0.1 + - jpeg <=9b - ca-certificates {{ environ.get('CONDA_TYPING_CONSTRAINT') }} diff --git a/setup.py b/setup.py index d6674465405..1e8f7c93f44 100644 --- a/setup.py +++ b/setup.py @@ -330,7 +330,9 @@ def get_extensions(): )) ffmpeg_exe = distutils.spawn.find_executable('ffmpeg') - has_ffmpeg = ffmpeg_exe is not None + # Disable ffmpeg by default + no_ffmpeg = os.environ.get("NO_FFMPEG", True) + has_ffmpeg = ffmpeg_exe is not None and not no_ffmpeg print("FFmpeg found: {}".format(has_ffmpeg)) if has_ffmpeg: diff --git a/test/test_video.py b/test/test_video.py index 67450de3600..8ba07d9fa66 100644 --- a/test/test_video.py +++ b/test/test_video.py @@ -276,6 +276,7 @@ def _template_read_video(video_object, s=0, e=None): return video_frames, audio_frames, video_object.get_metadata() +@unittest.skip("ffmpeg isn't included in this release skip these tests") @unittest.skipIf(_HAS_VIDEO_OPT is False, "Didn't compile with ffmpeg") class TestVideo(unittest.TestCase): @unittest.skipIf(av is None, "PyAV unavailable") diff --git a/test/test_video_reader.py b/test/test_video_reader.py index afdd2362536..f02bdc3990e 100644 --- a/test/test_video_reader.py +++ b/test/test_video_reader.py @@ -269,6 +269,7 @@ def _get_video_tensor(video_dir, video_file): return full_path, video_tensor +@unittest.skip("ffmpeg was not included in this release") @unittest.skipIf(av is None, "PyAV unavailable") @unittest.skipIf(_HAS_VIDEO_OPT is False, "Didn't compile with ffmpeg") class TestVideoReader(unittest.TestCase):