diff --git a/.circleci/build_docs/commit_docs.sh b/.circleci/build_docs/commit_docs.sh deleted file mode 100755 index 11297f9521..0000000000 --- a/.circleci/build_docs/commit_docs.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -set -ex - - -if [ "$2" == "" ]; then - echo call as "$0" "" "" - echo where src is the root of the built documentation git checkout and - echo branch should be "main" or "1.7" or so - exit 1 -fi - -src=$1 -target=$2 - -echo "committing docs from ${src} to ${target}" - -pushd $src -git checkout gh-pages -mkdir -p ./"${target}" -rm -rf ./"${target}"/* -cp -r "${src}/docs/build/html/"* ./"$target" -if [ "${target}" == "main" ]; then - mkdir -p ./_static - rm -rf ./_static/* - cp -r "${src}/docs/build/html/_static/"* ./_static - git add --all ./_static || true -fi -git add --all ./"${target}" || true -git config user.email "soumith+bot@pytorch.org" -git config user.name "pytorchbot" -# If there aren't changes, don't make a commit; push is no-op -git commit -m "auto-generating sphinx docs" || true -git remote add https https://github.com/pytorch/text.git -git push -u https gh-pages diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 033e8c3f75..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,133 +0,0 @@ -version: 2.1 - -# How to test the Linux jobs: -# - Install CircleCI local CLI: https://circleci.com/docs/2.0/local-cli/ -# - circleci config process .circleci/config.yml > gen.yml && circleci local execute -c gen.yml --job binary_linux_wheel_py3.8 -# - Replace binary_linux_wheel_py3.8 with the name of the job you want to test. -# Job names are 'name:' key. - -orbs: - win: circleci/windows@2.0.0 - -executors: - windows-cpu: - machine: - resource_class: windows.xlarge - image: windows-server-2019-vs2019:stable - shell: bash.exe - -commands: - designate_upload_channel: - description: "inserts the correct upload channel into ${BASH_ENV}" - steps: - - run: - name: adding UPLOAD_CHANNEL to BASH_ENV - command: | - our_upload_channel=nightly - # On tags upload to test instead - if [[ -n "${CIRCLE_TAG}" ]] || [[ ${CIRCLE_BRANCH} =~ release/* ]]; then - our_upload_channel=test - fi - echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV} - load_conda_channel_flags: - description: "Determines whether we need extra conda channels" - steps: - - run: - name: Adding CONDA_CHANNEL_FLAGS to BASH_ENV - command: | - CONDA_CHANNEL_FLAGS="" - -binary_common: &binary_common - parameters: - # Edit these defaults to do a release - build_version: - description: "version number of release binary; by default, build a nightly" - type: string - default: "" - pytorch_version: - description: "PyTorch version to build against; by default, use a nightly" - type: string - default: "" - torchdata_version: - description: "TorchData version to build against; by default, use a nightly" - type: string - default: "" - # Don't edit these - python_version: - description: "Python version to build against (e.g., 3.8)" - type: string - environment: - PYTHON_VERSION: << parameters.python_version >> - BUILD_VERSION: << parameters.build_version >> - PYTORCH_VERSION: << parameters.pytorch_version >> - TORCHDATA_VERSION: << parameters.torchdata_version >> - CU_VERSION: cpu - MACOSX_DEPLOYMENT_TARGET: 10.9 - -jobs: - circleci_consistency: - docker: - - image: cimg/python:3.8 - steps: - - checkout - - run: - name: Install check utilities - command: pip install --user --progress-bar=off jinja2 pyyaml - - run: - name: Check CircleCI config consistency - command: python .circleci/regenerate.py && git diff --quiet - - run: - when: on_fail - name: .circleci/config.yml not in sync with config.yml.in! Run '$ python .circleci/regenerate.py' to fix this. - command: exit 1 - - smoke_test_docker_image_build: - machine: - image: ubuntu-1604:201903-01 - resource_class: large - environment: - image_name: torchtext/smoke_test - steps: - - checkout - - run: - name: Build and push Docker image - no_output_timeout: "1h" - command: | - set +x - echo "${DOCKER_HUB_TOKEN}" | docker login --username "${DOCKER_HUB_USERNAME}" --password-stdin - set -x - cd .circleci/smoke_test/docker && docker build . -t ${image_name}:${CIRCLE_WORKFLOW_ID} - docker tag ${image_name}:${CIRCLE_WORKFLOW_ID} ${image_name}:latest - docker push ${image_name}:${CIRCLE_WORKFLOW_ID} - docker push ${image_name}:latest - - - stylecheck: - <<: *binary_common - docker: - - image: "pytorch/manylinux-cuda102" - resource_class: medium - steps: - - checkout - - designate_upload_channel - - run: - name: Setup - command: .circleci/unittest/linux/scripts/setup_env.sh - - run: - name: Run style check - command: .circleci/unittest/linux/scripts/run_style_checks.sh -workflows: - lint: - jobs: - - circleci_consistency - docker_build: - triggers: - - schedule: - cron: "0 10 * * 0" - filters: - branches: - only: - - main - jobs: - - smoke_test_docker_image_build: - context: org-member diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in deleted file mode 100644 index 033e8c3f75..0000000000 --- a/.circleci/config.yml.in +++ /dev/null @@ -1,133 +0,0 @@ -version: 2.1 - -# How to test the Linux jobs: -# - Install CircleCI local CLI: https://circleci.com/docs/2.0/local-cli/ -# - circleci config process .circleci/config.yml > gen.yml && circleci local execute -c gen.yml --job binary_linux_wheel_py3.8 -# - Replace binary_linux_wheel_py3.8 with the name of the job you want to test. -# Job names are 'name:' key. - -orbs: - win: circleci/windows@2.0.0 - -executors: - windows-cpu: - machine: - resource_class: windows.xlarge - image: windows-server-2019-vs2019:stable - shell: bash.exe - -commands: - designate_upload_channel: - description: "inserts the correct upload channel into ${BASH_ENV}" - steps: - - run: - name: adding UPLOAD_CHANNEL to BASH_ENV - command: | - our_upload_channel=nightly - # On tags upload to test instead - if [[ -n "${CIRCLE_TAG}" ]] || [[ ${CIRCLE_BRANCH} =~ release/* ]]; then - our_upload_channel=test - fi - echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV} - load_conda_channel_flags: - description: "Determines whether we need extra conda channels" - steps: - - run: - name: Adding CONDA_CHANNEL_FLAGS to BASH_ENV - command: | - CONDA_CHANNEL_FLAGS="" - -binary_common: &binary_common - parameters: - # Edit these defaults to do a release - build_version: - description: "version number of release binary; by default, build a nightly" - type: string - default: "" - pytorch_version: - description: "PyTorch version to build against; by default, use a nightly" - type: string - default: "" - torchdata_version: - description: "TorchData version to build against; by default, use a nightly" - type: string - default: "" - # Don't edit these - python_version: - description: "Python version to build against (e.g., 3.8)" - type: string - environment: - PYTHON_VERSION: << parameters.python_version >> - BUILD_VERSION: << parameters.build_version >> - PYTORCH_VERSION: << parameters.pytorch_version >> - TORCHDATA_VERSION: << parameters.torchdata_version >> - CU_VERSION: cpu - MACOSX_DEPLOYMENT_TARGET: 10.9 - -jobs: - circleci_consistency: - docker: - - image: cimg/python:3.8 - steps: - - checkout - - run: - name: Install check utilities - command: pip install --user --progress-bar=off jinja2 pyyaml - - run: - name: Check CircleCI config consistency - command: python .circleci/regenerate.py && git diff --quiet - - run: - when: on_fail - name: .circleci/config.yml not in sync with config.yml.in! Run '$ python .circleci/regenerate.py' to fix this. - command: exit 1 - - smoke_test_docker_image_build: - machine: - image: ubuntu-1604:201903-01 - resource_class: large - environment: - image_name: torchtext/smoke_test - steps: - - checkout - - run: - name: Build and push Docker image - no_output_timeout: "1h" - command: | - set +x - echo "${DOCKER_HUB_TOKEN}" | docker login --username "${DOCKER_HUB_USERNAME}" --password-stdin - set -x - cd .circleci/smoke_test/docker && docker build . -t ${image_name}:${CIRCLE_WORKFLOW_ID} - docker tag ${image_name}:${CIRCLE_WORKFLOW_ID} ${image_name}:latest - docker push ${image_name}:${CIRCLE_WORKFLOW_ID} - docker push ${image_name}:latest - - - stylecheck: - <<: *binary_common - docker: - - image: "pytorch/manylinux-cuda102" - resource_class: medium - steps: - - checkout - - designate_upload_channel - - run: - name: Setup - command: .circleci/unittest/linux/scripts/setup_env.sh - - run: - name: Run style check - command: .circleci/unittest/linux/scripts/run_style_checks.sh -workflows: - lint: - jobs: - - circleci_consistency - docker_build: - triggers: - - schedule: - cron: "0 10 * * 0" - filters: - branches: - only: - - main - jobs: - - smoke_test_docker_image_build: - context: org-member diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py deleted file mode 100755 index f3962ee084..0000000000 --- a/.circleci/regenerate.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python3 - -""" -This script should use a very simple, functional programming style. -Avoid Jinja macros in favor of native Python functions. - -Don't go overboard on code generation; use Python only to generate -content that can't be easily declared statically using CircleCI's YAML API. - -Data declarations (e.g. the nested loops for defining the configuration matrix) -should be at the top of the file for easy updating. - -See this comment for design rationale: -https://github.com/pytorch/vision/pull/1321#issuecomment-531033978 -""" - -import os.path - -import jinja2 -from jinja2 import select_autoescape - - -if __name__ == "__main__": - d = os.path.dirname(__file__) - env = jinja2.Environment( - loader=jinja2.FileSystemLoader(d), - lstrip_blocks=True, - autoescape=select_autoescape(enabled_extensions=("html", "xml")), - ) - - with open(os.path.join(d, "config.yml"), "w") as f: - f.write(env.get_template("config.yml.in").render()) - f.write("\n") diff --git a/.circleci/smoke_test/docker/Dockerfile b/.circleci/smoke_test/docker/Dockerfile deleted file mode 100644 index ba6f4fb020..0000000000 --- a/.circleci/smoke_test/docker/Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -# this Dockerfile is for torchtext smoke test, it will be created periodically via CI system -# if you need to do it locally, follow below steps once you have Docker installed -# to test the build use : docker build . -t torchtext/smoketest -# to upload the Dockerfile use build_and_push.sh script - -FROM ubuntu:latest - -RUN apt-get -qq update && apt-get -qq -y install curl bzip2 sox libsox-dev libsox-fmt-all \ - && curl -sSL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh \ - && bash /tmp/miniconda.sh -bfp /usr/local \ - && rm -rf /tmp/miniconda.sh \ - && conda install -c conda-forge gcc \ - && conda install -y python=3 \ - && conda update conda \ - && apt-get -qq -y remove curl bzip2 \ - && apt-get -qq -y autoremove \ - && apt-get autoclean \ - && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log \ - && conda clean --all --yes - -ENV PATH /opt/conda/bin:$PATH - - -RUN conda create -y --name python3.8 python=3.8 -RUN conda create -y --name python3.9 python=3.9 -RUN conda create -y --name python3.10 python=3.10 - -SHELL [ "/bin/bash", "-c" ] -RUN echo "source /usr/local/etc/profile.d/conda.sh" >> ~/.bashrc -RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.8 && conda install -y numpy -RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.9 && conda install -y numpy -RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.10 && conda install -y numpy -CMD [ "/bin/bash"] diff --git a/.circleci/smoke_test/docker/build_and_push.sh b/.circleci/smoke_test/docker/build_and_push.sh deleted file mode 100755 index ed67ad3b7a..0000000000 --- a/.circleci/smoke_test/docker/build_and_push.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -datestr="$(date "+%Y%m%d")" -image="pytorch/torchtext_smoke_base:smoke_test-${datestr}" -docker build -t "${image}" . -docker push "${image}" diff --git a/.circleci/utils/test_sort_yaml.py b/.circleci/utils/test_sort_yaml.py deleted file mode 100755 index 14a51ec974..0000000000 --- a/.circleci/utils/test_sort_yaml.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python3 - -""" -To compare new version with previous: - - ./regenerate.sh - meld <(git show HEAD:./config.yml | ./sort-yaml.py) <(cat config.yml | ./sort-yaml.py) -""" - - -import sys - -import yaml - -sys.stdout.write(yaml.dump(yaml.safe_load(sys.stdin, Loader=yaml.FullLoader), sort_keys=True))