From 0f44c8e925cf47a88a44c96523f35851118a4695 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Sun, 17 Jan 2021 12:13:34 -0800 Subject: [PATCH 1/4] Add hmaarrfk as maintainer @conda-forge-admin please rerender --- recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c3f3047e..1225eed2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -46,3 +46,4 @@ about: extra: recipe-maintainers: - nehaljwani + - hmaarrfk From 0825492ae5926a62a0c0d58736c21688c89663a9 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Sun, 17 Jan 2021 15:21:13 -0500 Subject: [PATCH 2/4] MNT: Re-rendered with conda-build 3.21.4, conda-smithy 3.8.6, and conda-forge-pinning 2021.01.15.19.38.06 --- .ci_support/linux_python2.7.yaml | 19 ----- .ci_support/linux_python3.6.yaml | 19 ----- .ci_support/linux_python3.7.yaml | 19 ----- .circleci/build_steps.sh | 40 ---------- .circleci/checkout_merge_commit.sh | 27 ------- .circleci/config.yml | 62 +++------------ .circleci/fast_finish_ci_pr_build.sh | 4 - .circleci/run_docker_build.sh | 50 ------------- .gitattributes | 18 +++++ .github/CODEOWNERS | 1 + .github/CONTRIBUTING.md | 15 ---- .github/ISSUE_TEMPLATE.md | 25 ------- .github/PULL_REQUEST_TEMPLATE.md | 18 ----- .github/workflows/{main.yml => automerge.yml} | 10 +-- LICENSE.txt | 2 +- README.md | 21 ++++-- build-locally.py | 75 +++++++++++++++++++ 17 files changed, 128 insertions(+), 297 deletions(-) delete mode 100644 .ci_support/linux_python2.7.yaml delete mode 100644 .ci_support/linux_python3.6.yaml delete mode 100644 .ci_support/linux_python3.7.yaml delete mode 100755 .circleci/build_steps.sh delete mode 100755 .circleci/checkout_merge_commit.sh delete mode 100755 .circleci/fast_finish_ci_pr_build.sh delete mode 100755 .circleci/run_docker_build.sh create mode 100644 .github/CODEOWNERS delete mode 100644 .github/CONTRIBUTING.md delete mode 100644 .github/ISSUE_TEMPLATE.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md rename .github/workflows/{main.yml => automerge.yml} (52%) create mode 100755 build-locally.py 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/.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..f87b2e2a --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @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/LICENSE.txt b/LICENSE.txt index 72dc8fd1..5f302793 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ BSD 3-clause license -Copyright (c) 2015-2018, conda-forge +Copyright (c) 2015-2020, 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..fbd320b8 100644 --- a/README.md +++ b/README.md @@ -5,18 +5,20 @@ Home: http://pytorch.org/ 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) + + +
Current release info ==================== @@ -50,6 +52,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 +63,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. @@ -104,3 +108,10 @@ In order to produce a uniquely identifiable distribution: * 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) back to 0. + +Feedstock Maintainers +===================== + +* [@hmaarrfk](https://github.com/hmaarrfk/) +* [@nehaljwani](https://github.com/nehaljwani/) + 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() From e96437efe07a7ef1edfbe4cfcdebb618b2f29c41 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Sun, 17 Jan 2021 15:21:39 -0500 Subject: [PATCH 3/4] fix spdx --- recipe/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 1225eed2..f1d9e23b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,8 +10,8 @@ source: sha256: 91f1e21121dca7e14ec35b5f2127da77c8c52e61d39957ab5dd4a719a837a04c build: - number: 1000 - skip: True # [not linux64] + number: 1001 + skip: True script: python setup.py install --single-version-externally-managed --record=record.txt requirements: @@ -36,7 +36,7 @@ test: 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 From 7bdabc780fb8516e8822822410884268eacc63b7 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Sun, 17 Jan 2021 19:12:37 -0500 Subject: [PATCH 4/4] Update meta.yaml --- recipe/meta.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index f1d9e23b..0283fb2a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "0.2.1" %} +{% set version = "1.7.1 " %} package: name: torchvision @@ -11,20 +11,26 @@ source: build: number: 1001 - skip: True - script: python setup.py install --single-version-externally-managed --record=record.txt + script: pip install . -vv requirements: build: + - {{ compiler('c') }} + - {{ compiler('cuda') }} # [cuda_compiler_version != "None"] + host: - python - setuptools - + - numpy + - cudnn # [cuda_compiler_version != "None"] + - libpng + - jpeg + - ffmpeg =4.2 # [not win] run: - python + - {{ pin_compatible('cudnn') }} # [cuda_compiler_version != "None"] + - {{ pin_compatible('numpy') }} - pillow >=4.1.1 - - numpy >=1.11 - pytorch >=0.3 - - six test: imports: