diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml new file mode 100755 index 00000000..962ce465 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -0,0 +1,72 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: linux + pool: + vmImage: ubuntu-16.04 + strategy: + matrix: + linux_64_cuda_compiler_version10.2cudnn7python3.6.____cpython: + CONFIG: linux_64_cuda_compiler_version10.2cudnn7python3.6.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:10.2 + linux_64_cuda_compiler_version10.2cudnn7python3.7.____cpython: + CONFIG: linux_64_cuda_compiler_version10.2cudnn7python3.7.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:10.2 + linux_64_cuda_compiler_version10.2cudnn7python3.8.____cpython: + CONFIG: linux_64_cuda_compiler_version10.2cudnn7python3.8.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:10.2 + linux_64_cuda_compiler_version11.0cudnn8python3.6.____cpython: + CONFIG: linux_64_cuda_compiler_version11.0cudnn8python3.6.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.0 + linux_64_cuda_compiler_version11.0cudnn8python3.7.____cpython: + CONFIG: linux_64_cuda_compiler_version11.0cudnn8python3.7.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.0 + linux_64_cuda_compiler_version11.0cudnn8python3.8.____cpython: + CONFIG: linux_64_cuda_compiler_version11.0cudnn8python3.8.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.0 + linux_64_cuda_compiler_versionNonecudnnundefinedpython3.6.____cpython: + CONFIG: linux_64_cuda_compiler_versionNonecudnnundefinedpython3.6.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + linux_64_cuda_compiler_versionNonecudnnundefinedpython3.7.____cpython: + CONFIG: linux_64_cuda_compiler_versionNonecudnnundefinedpython3.7.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + linux_64_cuda_compiler_versionNonecudnnundefinedpython3.8.____cpython: + CONFIG: linux_64_cuda_compiler_versionNonecudnnundefinedpython3.8.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + timeoutInMinutes: 360 + + steps: + - script: | + rm -rf /opt/ghc + df -h + displayName: Manage disk space + + # configure qemu binfmt-misc running. This allows us to run docker containers + # embedded qemu-static + - script: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes + ls /proc/sys/fs/binfmt_misc/ + condition: not(startsWith(variables['CONFIG'], 'linux_64')) + displayName: Configure binfmt_misc + + - script: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/run_docker_build.sh + displayName: Run docker build + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.ci_support/linux_64_cuda_compiler_version10.2cudnn7python3.6.____cpython.yaml b/.ci_support/linux_64_cuda_compiler_version10.2cudnn7python3.6.____cpython.yaml new file mode 100644 index 00000000..39ba374e --- /dev/null +++ b/.ci_support/linux_64_cuda_compiler_version10.2cudnn7python3.6.____cpython.yaml @@ -0,0 +1,49 @@ +c_compiler: +- gcc +c_compiler_version: +- '7' +cdt_name: +- cos6 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '10.2' +cudnn: +- '7' +cxx_compiler: +- gxx +cxx_compiler_version: +- '7' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:10.2 +jpeg: +- '9' +libpng: +- '1.6' +numpy: +- '1.16' +pin_run_as_build: + jpeg: + max_pin: x + libpng: + max_pin: x.x + python: + min_pin: x.x + max_pin: x.x +python: +- 3.6.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +- - cdt_name + - cuda_compiler_version + - cudnn + - docker_image +- - numpy + - python diff --git a/.ci_support/linux_64_cuda_compiler_version10.2cudnn7python3.7.____cpython.yaml b/.ci_support/linux_64_cuda_compiler_version10.2cudnn7python3.7.____cpython.yaml new file mode 100644 index 00000000..d6ac3dfa --- /dev/null +++ b/.ci_support/linux_64_cuda_compiler_version10.2cudnn7python3.7.____cpython.yaml @@ -0,0 +1,49 @@ +c_compiler: +- gcc +c_compiler_version: +- '7' +cdt_name: +- cos6 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '10.2' +cudnn: +- '7' +cxx_compiler: +- gxx +cxx_compiler_version: +- '7' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:10.2 +jpeg: +- '9' +libpng: +- '1.6' +numpy: +- '1.16' +pin_run_as_build: + jpeg: + max_pin: x + libpng: + max_pin: x.x + python: + min_pin: x.x + max_pin: x.x +python: +- 3.7.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +- - cdt_name + - cuda_compiler_version + - cudnn + - docker_image +- - numpy + - python diff --git a/.ci_support/linux_64_cuda_compiler_version10.2cudnn7python3.8.____cpython.yaml b/.ci_support/linux_64_cuda_compiler_version10.2cudnn7python3.8.____cpython.yaml new file mode 100644 index 00000000..546343c0 --- /dev/null +++ b/.ci_support/linux_64_cuda_compiler_version10.2cudnn7python3.8.____cpython.yaml @@ -0,0 +1,49 @@ +c_compiler: +- gcc +c_compiler_version: +- '7' +cdt_name: +- cos6 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '10.2' +cudnn: +- '7' +cxx_compiler: +- gxx +cxx_compiler_version: +- '7' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:10.2 +jpeg: +- '9' +libpng: +- '1.6' +numpy: +- '1.16' +pin_run_as_build: + jpeg: + max_pin: x + libpng: + max_pin: x.x + python: + min_pin: x.x + max_pin: x.x +python: +- 3.8.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +- - cdt_name + - cuda_compiler_version + - cudnn + - docker_image +- - numpy + - python diff --git a/.ci_support/linux_64_cuda_compiler_version11.0cudnn8python3.6.____cpython.yaml b/.ci_support/linux_64_cuda_compiler_version11.0cudnn8python3.6.____cpython.yaml new file mode 100644 index 00000000..a56764b5 --- /dev/null +++ b/.ci_support/linux_64_cuda_compiler_version11.0cudnn8python3.6.____cpython.yaml @@ -0,0 +1,49 @@ +c_compiler: +- gcc +c_compiler_version: +- '7' +cdt_name: +- cos6 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '11.0' +cudnn: +- '8' +cxx_compiler: +- gxx +cxx_compiler_version: +- '7' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:11.0 +jpeg: +- '9' +libpng: +- '1.6' +numpy: +- '1.16' +pin_run_as_build: + jpeg: + max_pin: x + libpng: + max_pin: x.x + python: + min_pin: x.x + max_pin: x.x +python: +- 3.6.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +- - cdt_name + - cuda_compiler_version + - cudnn + - docker_image +- - numpy + - python diff --git a/.ci_support/linux_64_cuda_compiler_version11.0cudnn8python3.7.____cpython.yaml b/.ci_support/linux_64_cuda_compiler_version11.0cudnn8python3.7.____cpython.yaml new file mode 100644 index 00000000..2080e30b --- /dev/null +++ b/.ci_support/linux_64_cuda_compiler_version11.0cudnn8python3.7.____cpython.yaml @@ -0,0 +1,49 @@ +c_compiler: +- gcc +c_compiler_version: +- '7' +cdt_name: +- cos6 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '11.0' +cudnn: +- '8' +cxx_compiler: +- gxx +cxx_compiler_version: +- '7' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:11.0 +jpeg: +- '9' +libpng: +- '1.6' +numpy: +- '1.16' +pin_run_as_build: + jpeg: + max_pin: x + libpng: + max_pin: x.x + python: + min_pin: x.x + max_pin: x.x +python: +- 3.7.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +- - cdt_name + - cuda_compiler_version + - cudnn + - docker_image +- - numpy + - python diff --git a/.ci_support/linux_64_cuda_compiler_version11.0cudnn8python3.8.____cpython.yaml b/.ci_support/linux_64_cuda_compiler_version11.0cudnn8python3.8.____cpython.yaml new file mode 100644 index 00000000..1b8af354 --- /dev/null +++ b/.ci_support/linux_64_cuda_compiler_version11.0cudnn8python3.8.____cpython.yaml @@ -0,0 +1,49 @@ +c_compiler: +- gcc +c_compiler_version: +- '7' +cdt_name: +- cos6 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '11.0' +cudnn: +- '8' +cxx_compiler: +- gxx +cxx_compiler_version: +- '7' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:11.0 +jpeg: +- '9' +libpng: +- '1.6' +numpy: +- '1.16' +pin_run_as_build: + jpeg: + max_pin: x + libpng: + max_pin: x.x + python: + min_pin: x.x + max_pin: x.x +python: +- 3.8.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +- - cdt_name + - cuda_compiler_version + - cudnn + - docker_image +- - numpy + - python diff --git a/.ci_support/linux_64_cuda_compiler_versionNonecudnnundefinedpython3.6.____cpython.yaml b/.ci_support/linux_64_cuda_compiler_versionNonecudnnundefinedpython3.6.____cpython.yaml new file mode 100644 index 00000000..db3320bd --- /dev/null +++ b/.ci_support/linux_64_cuda_compiler_versionNonecudnnundefinedpython3.6.____cpython.yaml @@ -0,0 +1,49 @@ +c_compiler: +- gcc +c_compiler_version: +- '7' +cdt_name: +- cos6 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- None +cudnn: +- undefined +cxx_compiler: +- gxx +cxx_compiler_version: +- '7' +docker_image: +- quay.io/condaforge/linux-anvil-comp7 +jpeg: +- '9' +libpng: +- '1.6' +numpy: +- '1.16' +pin_run_as_build: + jpeg: + max_pin: x + libpng: + max_pin: x.x + python: + min_pin: x.x + max_pin: x.x +python: +- 3.6.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +- - cdt_name + - cuda_compiler_version + - cudnn + - docker_image +- - numpy + - python diff --git a/.ci_support/linux_64_cuda_compiler_versionNonecudnnundefinedpython3.7.____cpython.yaml b/.ci_support/linux_64_cuda_compiler_versionNonecudnnundefinedpython3.7.____cpython.yaml new file mode 100644 index 00000000..32d0eefb --- /dev/null +++ b/.ci_support/linux_64_cuda_compiler_versionNonecudnnundefinedpython3.7.____cpython.yaml @@ -0,0 +1,49 @@ +c_compiler: +- gcc +c_compiler_version: +- '7' +cdt_name: +- cos6 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- None +cudnn: +- undefined +cxx_compiler: +- gxx +cxx_compiler_version: +- '7' +docker_image: +- quay.io/condaforge/linux-anvil-comp7 +jpeg: +- '9' +libpng: +- '1.6' +numpy: +- '1.16' +pin_run_as_build: + jpeg: + max_pin: x + libpng: + max_pin: x.x + python: + min_pin: x.x + max_pin: x.x +python: +- 3.7.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +- - cdt_name + - cuda_compiler_version + - cudnn + - docker_image +- - numpy + - python diff --git a/.ci_support/linux_64_cuda_compiler_versionNonecudnnundefinedpython3.8.____cpython.yaml b/.ci_support/linux_64_cuda_compiler_versionNonecudnnundefinedpython3.8.____cpython.yaml new file mode 100644 index 00000000..2ec484e2 --- /dev/null +++ b/.ci_support/linux_64_cuda_compiler_versionNonecudnnundefinedpython3.8.____cpython.yaml @@ -0,0 +1,49 @@ +c_compiler: +- gcc +c_compiler_version: +- '7' +cdt_name: +- cos6 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- None +cudnn: +- undefined +cxx_compiler: +- gxx +cxx_compiler_version: +- '7' +docker_image: +- quay.io/condaforge/linux-anvil-comp7 +jpeg: +- '9' +libpng: +- '1.6' +numpy: +- '1.16' +pin_run_as_build: + jpeg: + max_pin: x + libpng: + max_pin: x.x + python: + min_pin: x.x + max_pin: x.x +python: +- 3.8.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +- - cdt_name + - cuda_compiler_version + - cudnn + - docker_image +- - numpy + - python diff --git a/.ci_support/linux_python2.7.yaml b/.ci_support/linux_python2.7.yaml deleted file mode 100644 index a52c5e62..00000000 --- a/.ci_support/linux_python2.7.yaml +++ /dev/null @@ -1,19 +0,0 @@ -build_number_decrement: -- '0' -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -docker_image: -- conda/c3i-linux-64 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- '2.7' -zip_keys: -- - channel_sources - - channel_targets - - docker_image - - build_number_decrement diff --git a/.ci_support/linux_python3.6.yaml b/.ci_support/linux_python3.6.yaml deleted file mode 100644 index 10a2f976..00000000 --- a/.ci_support/linux_python3.6.yaml +++ /dev/null @@ -1,19 +0,0 @@ -build_number_decrement: -- '0' -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -docker_image: -- conda/c3i-linux-64 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- '3.6' -zip_keys: -- - channel_sources - - channel_targets - - docker_image - - build_number_decrement diff --git a/.ci_support/linux_python3.7.yaml b/.ci_support/linux_python3.7.yaml deleted file mode 100644 index e96cebf2..00000000 --- a/.ci_support/linux_python3.7.yaml +++ /dev/null @@ -1,19 +0,0 @@ -build_number_decrement: -- '0' -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -docker_image: -- conda/c3i-linux-64 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- '3.7' -zip_keys: -- - channel_sources - - channel_targets - - docker_image - - build_number_decrement diff --git a/.ci_support/migrations/cuda110.yaml b/.ci_support/migrations/cuda110.yaml new file mode 100644 index 00000000..e184cca0 --- /dev/null +++ b/.ci_support/migrations/cuda110.yaml @@ -0,0 +1,10 @@ +migrator_ts: 1601612527 +__migrator: + kind: + version + migration_number: + 1 + build_number: + 1 + override_cbc_keys: + - cuda_compiler_stub diff --git a/.circleci/build_steps.sh b/.circleci/build_steps.sh deleted file mode 100755 index 258a085a..00000000 --- a/.circleci/build_steps.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here -# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent -# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also -# benefit from the improvement. - -set -xeuo pipefail -export PYTHONUNBUFFERED=1 -export FEEDSTOCK_ROOT=/home/conda/feedstock_root -export RECIPE_ROOT=/home/conda/recipe_root -export CI_SUPPORT=/home/conda/feedstock_root/.ci_support -export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" - -cat >~/.condarc < /dev/null -fi diff --git a/.circleci/config.yml b/.circleci/config.yml index e4524f17..6ad461b8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,62 +1,24 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + version: 2 jobs: - build_linux_python2.7: - working_directory: ~/test - machine: true - environment: - - CONFIG: "linux_python2.7" - steps: - - checkout - - run: - name: Fast finish outdated PRs and merge PRs - command: | - ./.circleci/fast_finish_ci_pr_build.sh - ./.circleci/checkout_merge_commit.sh - - run: - command: docker pull condaforge/linux-anvil - - run: - # Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. - command: ./.circleci/run_docker_build.sh - build_linux_python3.6: + build: working_directory: ~/test machine: true - environment: - - CONFIG: "linux_python3.6" steps: - - checkout - - run: - name: Fast finish outdated PRs and merge PRs - command: | - ./.circleci/fast_finish_ci_pr_build.sh - ./.circleci/checkout_merge_commit.sh - - run: - command: docker pull condaforge/linux-anvil - - run: - # Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. - command: ./.circleci/run_docker_build.sh - build_linux_python3.7: - working_directory: ~/test - machine: true - environment: - - CONFIG: "linux_python3.7" - steps: - - checkout - - run: - name: Fast finish outdated PRs and merge PRs - command: | - ./.circleci/fast_finish_ci_pr_build.sh - ./.circleci/checkout_merge_commit.sh - - run: - command: docker pull condaforge/linux-anvil - run: - # Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. - command: ./.circleci/run_docker_build.sh + # The Circle-CI build should not be active, but if this is not true for some reason, do a fast finish. + command: exit 0 workflows: version: 2 build_and_test: jobs: - - build_linux_python2.7 - - build_linux_python3.6 - - build_linux_python3.7 + - build: + filters: + branches: + ignore: + - /.*/ diff --git a/.circleci/fast_finish_ci_pr_build.sh b/.circleci/fast_finish_ci_pr_build.sh deleted file mode 100755 index 8c048ac9..00000000 --- a/.circleci/fast_finish_ci_pr_build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -curl https://raw.githubusercontent.com/conda-forge/conda-forge-ci-setup-feedstock/branch2.0/recipe/conda_forge_ci_setup/ff_ci_pr_build.py | \ - python - -v --ci "circle" "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" "${CIRCLE_BUILD_NUM}" "${CIRCLE_PR_NUMBER}" diff --git a/.circleci/run_docker_build.sh b/.circleci/run_docker_build.sh deleted file mode 100755 index f2959f6f..00000000 --- a/.circleci/run_docker_build.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash - -# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here -# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent -# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also -# benefit from the improvement. - -set -xeuo pipefail - -FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) -RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" - -docker info - -# In order for the conda-build process in the container to write to the mounted -# volumes, we need to run with the same id as the host machine, which is -# normally the owner of the mounted volumes, or at least has write permission -export HOST_USER_ID=$(id -u) -# Check if docker-machine is being used (normally on OSX) and get the uid from -# the VM -if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then - export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) -fi - -ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" - -if [ -z "$CONFIG" ]; then - echo "Need to set CONFIG env variable" - exit 1 -fi - -pip install shyaml -DOCKER_IMAGE=$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil ) - -mkdir -p "$ARTIFACTS" -DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" -rm -f "$DONE_CANARY" - -docker run -it \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root \ - -e CONFIG \ - -e BINSTAR_TOKEN \ - -e HOST_USER_ID \ - $DOCKER_IMAGE \ - bash \ - /home/conda/feedstock_root/.circleci/build_steps.sh - -# verify that the end of the script was reached -test -f "$DONE_CANARY" \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 974953ec..9060b272 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,21 @@ meta.yaml text eol=lf build.sh text eol=lf bld.bat text eol=crlf + +# github helper pieces to make some files not show up in diffs automatically +.azure-pipelines/* linguist-generated=true +.circleci/* linguist-generated=true +.drone/* linguist-generated=true +.drone.yml linguist-generated=true +.github/* linguist-generated=true +.travis/* linguist-generated=true +.appveyor.yml linguist-generated=true +.gitattributes linguist-generated=true +.gitignore linguist-generated=true +.travis.yml linguist-generated=true +.scripts/* linguist-generated=true +LICENSE.txt linguist-generated=true +README.md linguist-generated=true +azure-pipelines.yml linguist-generated=true +build-locally.py linguist-generated=true +shippable.yml linguist-generated=true diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..e770eff0 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @h-vetinari @hmaarrfk @nehaljwani \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index d87090f2..00000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,15 +0,0 @@ -Thanks for your interest in helping out conda-forge. - -Whether you are brand new or a seasoned maintainer, we always appreciate -feedback from the community about how we can improve conda-forge. If you -are submitting a PR or issue, please fill out the respective template. Should -any questions arise please feel free to ask the maintainer team of the -respective feedstock or reach out to `@conda-forge/core` for more complex -issues. - -In the case of any issues reported, please be sure to demonstrate the relevant -issue (even if it is an absence of a feature). Providing this information will -help busy maintainers understand what it is you hope to accomplish. Also this -will help provide them clues as to what might be going wrong. These examples -can also be reused as tests in the build to ensure further packages meet these -criteria. This is requested to help you get timely and relevant feedback. :) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index fc953349..00000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,25 +0,0 @@ - -Issue: - -
-Environment (conda list): -
- -``` -$ conda list - -``` -
- -
-Details about conda and system ( conda info ): -
- -``` -$ conda info - -``` -
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 047fdafd..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,18 +0,0 @@ - -Checklist -* [ ] Used a fork of the feedstock to propose changes -* [ ] Bumped the build number (if the version is unchanged) -* [ ] Reset the build number to `0` (if the version changed) -* [ ] [Re-rendered]( https://conda-forge.org/docs/conda_smithy.html#how-to-re-render ) with the latest `conda-smithy` (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering) -* [ ] Ensured the license file is being packaged. - - - - diff --git a/.github/workflows/main.yml b/.github/workflows/automerge.yml similarity index 52% rename from .github/workflows/main.yml rename to .github/workflows/automerge.yml index 0e9646a6..e8e59028 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/automerge.yml @@ -5,14 +5,14 @@ on: - completed jobs: - regro-cf-autotick-bot-action: + automerge-action: runs-on: ubuntu-latest - name: regro-cf-autotick-bot-action + name: automerge steps: - name: checkout uses: actions/checkout@v2 - - name: regro-cf-autotick-bot-action - id: regro-cf-autotick-bot-action - uses: regro/cf-autotick-bot-action@master + - name: automerge-action + id: automerge-action + uses: conda-forge/automerge-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh new file mode 100755 index 00000000..522eabcf --- /dev/null +++ b/.scripts/build_steps.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +# benefit from the improvement. + +set -xeuo pipefail +export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" +source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh + + +endgroup "Start Docker" + +startgroup "Configuring conda" +export PYTHONUNBUFFERED=1 +export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" +export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" +export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" + +cat >~/.condarc </dev/null && pwd )" +PROVIDER_DIR="$(basename $THISDIR)" + +FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) +RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" + +if [ -z ${FEEDSTOCK_NAME} ]; then + export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) +fi + +docker info + +# In order for the conda-build process in the container to write to the mounted +# volumes, we need to run with the same id as the host machine, which is +# normally the owner of the mounted volumes, or at least has write permission +export HOST_USER_ID=$(id -u) +# Check if docker-machine is being used (normally on OSX) and get the uid from +# the VM +if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then + export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) +fi + +ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" + +if [ -z "$CONFIG" ]; then + set +x + FILES=`ls .ci_support/linux_*` + CONFIGS="" + for file in $FILES; do + CONFIGS="${CONFIGS}'${file:12:-5}' or "; + done + echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}" + exit 1 +fi + +if [ -z "${DOCKER_IMAGE}" ]; then + SHYAML_INSTALLED="$(shyaml -h || echo NO)" + if [ "${SHYAML_INSTALLED}" == "NO" ]; then + echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils" + DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-) + if [ "${DOCKER_IMAGE}" = "" ]; then + echo "No docker_image entry found in ${CONFIG}. Falling back to condaforge/linux-anvil-comp7" + DOCKER_IMAGE="condaforge/linux-anvil-comp7" + fi + else + DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 )" + fi +fi + +mkdir -p "$ARTIFACTS" +DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" +rm -f "$DONE_CANARY" + +# Allow people to specify extra default arguments to `docker run` (e.g. `--rm`) +DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" +if [ -z "${CI}" ]; then + DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" +fi +endgroup "Configure Docker" + +startgroup "Start Docker" +export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" +docker run ${DOCKER_RUN_ARGS} \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ + -e CONFIG \ + -e HOST_USER_ID \ + -e UPLOAD_PACKAGES \ + -e GIT_BRANCH \ + -e UPLOAD_ON_BRANCH \ + -e CI \ + -e FEEDSTOCK_NAME \ + -e CPU_COUNT \ + -e BUILD_WITH_CONDA_DEBUG \ + -e BUILD_OUTPUT_ID \ + -e BINSTAR_TOKEN \ + -e FEEDSTOCK_TOKEN \ + -e STAGING_BINSTAR_TOKEN \ + $DOCKER_IMAGE \ + bash \ + /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh + +# verify that the end of the script was reached +test -f "$DONE_CANARY" \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index 72dc8fd1..ed3f451e 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ BSD 3-clause license -Copyright (c) 2015-2018, conda-forge +Copyright (c) 2015-2021, conda-forge contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index 3ac75626..961103d4 100644 --- a/README.md +++ b/README.md @@ -3,20 +3,103 @@ About torchvision Home: http://pytorch.org/ -Package license: BSD 3-Clause +Package license: BSD-3-Clause -Feedstock license: BSD 3-Clause +Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/torchvision-feedstock/blob/master/LICENSE.txt) Summary: Image and video datasets and models for torch deep learning +Development: https://github.com/pytorch/vision +Documentation: http://pytorch.org/docs/master/torchvision Current build status ==================== -[![Linux](https://img.shields.io/circleci/project/github/conda-forge/torchvision-feedstock/master.svg?label=Linux)](https://circleci.com/gh/conda-forge/torchvision-feedstock) -![OSX disabled](https://img.shields.io/badge/OSX-disabled-lightgrey.svg) -![Windows disabled](https://img.shields.io/badge/Windows-disabled-lightgrey.svg) + + + + + + + +
Azure +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariantStatus
linux_64_cuda_compiler_version10.2cudnn7python3.6.____cpython + + variant + +
linux_64_cuda_compiler_version10.2cudnn7python3.7.____cpython + + variant + +
linux_64_cuda_compiler_version10.2cudnn7python3.8.____cpython + + variant + +
linux_64_cuda_compiler_version11.0cudnn8python3.6.____cpython + + variant + +
linux_64_cuda_compiler_version11.0cudnn8python3.7.____cpython + + variant + +
linux_64_cuda_compiler_version11.0cudnn8python3.8.____cpython + + variant + +
linux_64_cuda_compiler_versionNonecudnnundefinedpython3.6.____cpython + + variant + +
linux_64_cuda_compiler_versionNonecudnnundefinedpython3.7.____cpython + + variant + +
linux_64_cuda_compiler_versionNonecudnnundefinedpython3.8.____cpython + + variant + +
+
+
Current release info ==================== @@ -24,6 +107,7 @@ Current release info | Name | Downloads | Version | Platforms | | --- | --- | --- | --- | | [![Conda Recipe](https://img.shields.io/badge/recipe-torchvision-green.svg)](https://anaconda.org/conda-forge/torchvision) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/torchvision.svg)](https://anaconda.org/conda-forge/torchvision) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/torchvision.svg)](https://anaconda.org/conda-forge/torchvision) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/torchvision.svg)](https://anaconda.org/conda-forge/torchvision) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-torchvision--cpu-green.svg)](https://anaconda.org/conda-forge/torchvision-cpu) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/torchvision-cpu.svg)](https://anaconda.org/conda-forge/torchvision-cpu) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/torchvision-cpu.svg)](https://anaconda.org/conda-forge/torchvision-cpu) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/torchvision-cpu.svg)](https://anaconda.org/conda-forge/torchvision-cpu) | Installing torchvision ====================== @@ -34,10 +118,10 @@ Installing `torchvision` from the `conda-forge` channel can be achieved by addin conda config --add channels conda-forge ``` -Once the `conda-forge` channel has been enabled, `torchvision` can be installed with: +Once the `conda-forge` channel has been enabled, `torchvision, torchvision-cpu` can be installed with: ``` -conda install torchvision +conda install torchvision torchvision-cpu ``` It is possible to list all of the versions of `torchvision` available on your platform with: @@ -50,6 +134,8 @@ conda search torchvision --channel conda-forge About conda-forge ================= +[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](http://numfocus.org) + conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the conda-forge GitHub organization. The conda-forge organization contains one repository @@ -59,7 +145,7 @@ A feedstock is made up of a conda recipe (the instructions on what and how to bu the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by [CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/) -and [TravisCI](https://travis-ci.org/) it is possible to build and upload installable +and [TravisCI](https://travis-ci.com/) it is possible to build and upload installable packages to the [conda-forge](https://anaconda.org/conda-forge) [Anaconda-Cloud](https://anaconda.org/) channel for Linux, Windows and OSX respectively. @@ -100,7 +186,15 @@ build distinct package versions. In order to produce a uniquely identifiable distribution: * If the version of a package **is not** being increased, please add or increase - the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string). + the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string). * If the version of a package **is** being increased, please remember to return - the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string) + the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string) back to 0. + +Feedstock Maintainers +===================== + +* [@h-vetinari](https://github.com/h-vetinari/) +* [@hmaarrfk](https://github.com/hmaarrfk/) +* [@nehaljwani](https://github.com/nehaljwani/) + diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..ad85a2cc --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,6 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: + - template: ./.azure-pipelines/azure-pipelines-linux.yml \ No newline at end of file diff --git a/build-locally.py b/build-locally.py new file mode 100755 index 00000000..3453cfe6 --- /dev/null +++ b/build-locally.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 +# +# This file has been generated by conda-smithy in order to build the recipe +# locally. +# +import os +import glob +import subprocess +from argparse import ArgumentParser + + +def setup_environment(ns): + os.environ["CONFIG"] = ns.config + os.environ["UPLOAD_PACKAGES"] = "False" + if ns.debug: + os.environ["BUILD_WITH_CONDA_DEBUG"] = "1" + if ns.output_id: + os.environ["BUILD_OUTPUT_ID"] = ns.output_id + + +def run_docker_build(ns): + script = ".scripts/run_docker_build.sh" + subprocess.check_call([script]) + + +def verify_config(ns): + valid_configs = { + os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml") + } + print(f"valid configs are {valid_configs}") + if ns.config in valid_configs: + print("Using " + ns.config + " configuration") + return + elif len(valid_configs) == 1: + ns.config = valid_configs.pop() + print("Found " + ns.config + " configuration") + elif ns.config is None: + print("config not selected, please choose from the following:\n") + selections = list(enumerate(sorted(valid_configs), 1)) + for i, c in selections: + print(f"{i}. {c}") + s = input("\n> ") + idx = int(s) - 1 + ns.config = selections[idx][1] + print(f"selected {ns.config}") + else: + raise ValueError("config " + ns.config + " is not valid") + # Remove the following, as implemented + if not ns.config.startswith("linux"): + raise ValueError( + f"only Linux configs currently supported, got {ns.config}" + ) + + +def main(args=None): + p = ArgumentParser("build-locally") + p.add_argument("config", default=None, nargs="?") + p.add_argument( + "--debug", + action="store_true", + help="Setup debug environment using `conda debug`", + ) + p.add_argument( + "--output-id", help="If running debug, specify the output to setup." + ) + + ns = p.parse_args(args=args) + verify_config(ns) + setup_environment(ns) + + run_docker_build(ns) + + +if __name__ == "__main__": + main() diff --git a/conda-forge.yml b/conda-forge.yml index 46ee5770..d22634d6 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,7 +1,7 @@ appveyor: - secure: {BINSTAR_TOKEN: tumuXLL8PU75WMnRDemRy02ruEq2RpNxeK3dz0MjFssnosPm2v4EFjfNB4PTotA1} -compiler_stack: comp7 -max_py_ver: '37' -max_r_ver: '35' + secure: + BINSTAR_TOKEN: tumuXLL8PU75WMnRDemRy02ruEq2RpNxeK3dz0MjFssnosPm2v4EFjfNB4PTotA1 +conda_forge_output_validation: true travis: - secure: {BINSTAR_TOKEN: jhRqurvqo+tLoVIayFfpG1SfGn3i0Bc1LX5XOjqH1l08ADB3UHkM93K/xjgTGdQQrtgg5x8PrBGONHcT6ids/5MOADa2Rxcvi3bTVeI+eTU/Y8fZx+m5yCPn0G0ACi2T1inXL72HGHBzKpKK174t12v4eYk6TL9ceKmDgzEOJblsLH1LM7tXen61Dm/khDHRT7YZ+bgFkQppknrzVfds6k1JShqm37vWD6sshEwCR+MDwAFNdrDLPBeq44CnXpOCE7CfAYGSGw8SRQtYpSgLYV2th2no453r1z9hij4ftU5ViJggpJ0rIwMy+2a3rAgbFN3/NutIpan5Yne8X0+0OjFJUFA/hGNvZHthKLIOQBtQlOM0BfmlgsUcA+sZ69THpevyTQ7aOCbfOstsnP0gCcy/BBBrMciWRairQX9BPlYV4wmcfw2U2UkNCyHEwm93oHHq4m8NCgrZ6GpfA0sGgwHE1xr+gdZf2sl2q62I84cQKYwm9YEG6aNY1EszyiykhjM8VpyWN+HpdHv4OUJO8fzYoWcRWLwlQmDQEGpilVvaEmJLym6vnBGgtPXVBlop86hj7g4YtmwkG1xa+ICy+F7O6aff8LQkkYL97UJEX+muN1FMQpWKiesgD4N6UZAC/v2R3wfxtJo7b7hb8F1u9zmiyrcn5cjcBdHuTAXWd+c=} + secure: + BINSTAR_TOKEN: jhRqurvqo+tLoVIayFfpG1SfGn3i0Bc1LX5XOjqH1l08ADB3UHkM93K/xjgTGdQQrtgg5x8PrBGONHcT6ids/5MOADa2Rxcvi3bTVeI+eTU/Y8fZx+m5yCPn0G0ACi2T1inXL72HGHBzKpKK174t12v4eYk6TL9ceKmDgzEOJblsLH1LM7tXen61Dm/khDHRT7YZ+bgFkQppknrzVfds6k1JShqm37vWD6sshEwCR+MDwAFNdrDLPBeq44CnXpOCE7CfAYGSGw8SRQtYpSgLYV2th2no453r1z9hij4ftU5ViJggpJ0rIwMy+2a3rAgbFN3/NutIpan5Yne8X0+0OjFJUFA/hGNvZHthKLIOQBtQlOM0BfmlgsUcA+sZ69THpevyTQ7aOCbfOstsnP0gCcy/BBBrMciWRairQX9BPlYV4wmcfw2U2UkNCyHEwm93oHHq4m8NCgrZ6GpfA0sGgwHE1xr+gdZf2sl2q62I84cQKYwm9YEG6aNY1EszyiykhjM8VpyWN+HpdHv4OUJO8fzYoWcRWLwlQmDQEGpilVvaEmJLym6vnBGgtPXVBlop86hj7g4YtmwkG1xa+ICy+F7O6aff8LQkkYL97UJEX+muN1FMQpWKiesgD4N6UZAC/v2R3wfxtJo7b7hb8F1u9zmiyrcn5cjcBdHuTAXWd+c= diff --git a/recipe/bld.bat b/recipe/bld.bat new file mode 100644 index 00000000..4cb9ecd4 --- /dev/null +++ b/recipe/bld.bat @@ -0,0 +1,2 @@ +set "TORCHVISION_INCLUDE=%LIBRARY_INC%" +%PYTHON% -m pip install . -vv diff --git a/recipe/build-torch.bat b/recipe/build-torch.bat new file mode 100644 index 00000000..4cb9ecd4 --- /dev/null +++ b/recipe/build-torch.bat @@ -0,0 +1,2 @@ +set "TORCHVISION_INCLUDE=%LIBRARY_INC%" +%PYTHON% -m pip install . -vv diff --git a/recipe/build-torch.sh b/recipe/build-torch.sh new file mode 100644 index 00000000..2ebd9fc9 --- /dev/null +++ b/recipe/build-torch.sh @@ -0,0 +1,23 @@ +if [[ "$cuda_compiler_version" == "None" ]]; then + export FORCE_CUDA=0 +else + export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX" + if [[ ${cuda_compiler_version} == 9.0* ]]; then + export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;7.0" + elif [[ ${cuda_compiler_version} == 9.2* ]]; then + export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0" + elif [[ ${cuda_compiler_version} == 10.* ]]; then + export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5" + elif [[ ${cuda_compiler_version} == 11.0* ]]; then + export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5;8.0" + elif [[ ${cuda_compiler_version} == 11.1* ]]; then + export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5;8.0;8.6" + else + echo "unsupported cuda version. edit build.sh" + exit 1 + fi + export FORCE_CUDA=1 +fi + +export TORCHVISION_INCLUDE="${PREFIX}/include/" +${PYTHON} -m pip install . -vv diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c3f3047e..1093b720 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,42 +1,98 @@ -{% set version = "0.2.1" %} +{% set version = "0.8.2" %} +{% set number = 0 %} +# see github.com/conda-forge/conda-forge.github.io/issues/1059 for naming discussion +{% set torch_proc_type = "cuda" if cuda_compiler_version != "None" else "cpu" %} package: - name: torchvision + name: torchvision-split version: {{ version }} source: fn: torchvision-{{ version }}.tar.gz url: https://github.com/pytorch/vision/archive/v{{ version }}.tar.gz - sha256: 91f1e21121dca7e14ec35b5f2127da77c8c52e61d39957ab5dd4a719a837a04c + sha256: 9a866c3c8feb23b3221ce261e6153fc65a98ce9ceaa71ccad017016945c178bf + patches: + # skip failing test thats already marked as flaky upstream, see + # https://github.com/pytorch/vision/blob/v0.8.2/test/test_models.py#L90 + - patches/0001-skip-flaky-test.patch build: - number: 1000 - skip: True # [not linux64] - script: python setup.py install --single-version-externally-managed --record=record.txt + number: {{ number }} + skip: true # [not linux] requirements: build: - - python - - setuptools - - run: - - python - - pillow >=4.1.1 - - numpy >=1.11 - - pytorch >=0.3 - - six - -test: - imports: - - torchvision - - torchvision.datasets - - torchvision.models - - torchvision.transforms - - torchvision.utils + - {{ compiler('cxx') }} + +build: + number: 0 + skip: true # [not linux64] + +outputs: + - name: torchvision + script: build-torch.sh # [not win] + script: build-torch.bat # [win] + build: + string: "h{{ PKG_HASH }}_{{ number }}_{{ torch_proc_type }}" # [cuda_compiler_version == "None"] + string: "cuda{{ cuda_compiler_version|replace(".", "") }}h{{ PKG_HASH }}_{{ number }}_{{ torch_proc_type }}" # [cuda_compiler_version != "None"] + run_exports: + # ensure matching proc-type + - torchvision =*=*_{{ torch_proc_type }} + + requirements: + build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} # [cuda_compiler_version != "None"] + host: + - python + - pip + - setuptools + - cudnn # [cuda_compiler_version != "None"] + # split off image/video into separate outputs? + - jpeg + - libpng + # ffmpeg + - numpy + - pillow >=4.1.1 + - pytorch =*={{ torch_proc_type }}* + run: + - python + - pytorch =*={{ torch_proc_type }}* + - {{ pin_compatible('cudnn') }} # [cuda_compiler_version != "None"] + - {{ pin_compatible('numpy') }} + - pillow >=4.1.1 + + test: + requires: + - pytest + - scipy + source_files: + - test + imports: + - torchvision + - torchvision.datasets + - torchvision.models + - torchvision.transforms + - torchvision.utils + commands: + - pytest test/ + + # for compatibility with (& ease of migration from) old packages in the pytorch channel, see + # https://anaconda.org/pytorch/torchvision-cpu/files + - name: torchvision-cpu + build: + skip: true # [cuda_compiler_version != "None"] + requirements: + run: + - torchvision ={{ version }}=*_cpu + test: + imports: + - torchvision about: home: http://pytorch.org/ - license: BSD 3-Clause + license: BSD-3-Clause license_family: BSD license_file: LICENSE summary: Image and video datasets and models for torch deep learning @@ -46,3 +102,6 @@ about: extra: recipe-maintainers: - nehaljwani + - hmaarrfk + - h-vetinari + feedstock-name: torchvision diff --git a/recipe/patches/0001-skip-flaky-test.patch b/recipe/patches/0001-skip-flaky-test.patch new file mode 100644 index 00000000..c3a01c76 --- /dev/null +++ b/recipe/patches/0001-skip-flaky-test.patch @@ -0,0 +1,26 @@ +From 85b8e229bf0d89bb90a82b51512b51121a97e2ef Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Sat, 30 Jan 2021 22:21:06 +0100 +Subject: [PATCH] skip flaky test + +--- + test/test_models.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/test/test_models.py b/test/test_models.py +index faa14f8..ebc7ec5 100644 +--- a/test/test_models.py ++++ b/test/test_models.py +@@ -182,6 +182,9 @@ class ModelTester(TestCase): + strip_suffix="_" + dev) + + check_out(out) ++ # skip flaky test ++ if name == "maskrcnn_resnet50_fpn": ++ return + + scripted_model = torch.jit.script(model) + scripted_model.eval() +-- +2.29.2.windows.3 +