Repository: pytorch/vision

Issue:
Do we need the Docker CI job?
The CircleCI config is finally getting quite scarce. One of the jobs we have not on our migration plan to GHA yet, is our Docker smoke test:

https://github.com/pytorch/vision/blob/300a90926e88f13abbaf3d8155cdba36aab86ab4/.circleci/config.yml#L261-L271

https://github.com/pytorch/vision/blob/300a90926e88f13abbaf3d8155cdba36aab86ab4/.circleci/config.yml#L127-L146

https://github.com/pytorch/vision/blob/300a90926e88f13abbaf3d8155cdba36aab86ab4/.circleci/smoke_test/docker/Dockerfile#L12-L34

TBH, I didn't even know it was there. It runs [once a week](https://crontab.guru/#0_10_*_*_0) and I have never seen it fail for as long as I have been around. Not that I have checked, since there is no feedback mechanism to alert us of any failures.

Looking at the CircleCI logs, it seems the job is also net setup correctly, as it is not run and marked as [unauthorized](https://app.circleci.com/pipelines/github/pytorch/vision/24668).

I guess this can go?

cc @seemethere


Discussion:
Ok, I think I understand now. I was confused why this "smoke test" doesn't even install TorchVision and thus what its purpose actually is. Looking at #2437 that added it, is seems that this was never a smoke test, but built the image that other smoke tests were run on. 

Since we have proper smoke tests for our wheel and conda builds on GHA already, there is no need to keep this.

Resolving patch:
diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py
deleted file mode 100755
--- a/.circleci/regenerate.py
+++ /dev/null
@@ -1,58 +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
-import yaml
-from jinja2 import select_autoescape
-
-
-def indent(indentation, data_list):
-    return ("\n" + " " * indentation).join(yaml.dump(data_list, default_flow_style=False).splitlines())
-
-
-def cmake_workflows(indentation=6):
-    jobs = []
-    python_version = "3.8"
-    for os_type in ["linux", "windows", "macos"]:
-        # Skip OSX CUDA
-        device_types = ["cpu", "gpu"] if os_type != "macos" else ["cpu"]
-        for device in device_types:
-            job = {"name": f"cmake_{os_type}_{device}", "python_version": python_version}
-
-            job["cu_version"] = "cu117" if device == "gpu" else "cpu"
-            if device == "gpu" and os_type == "linux":
-                job["wheel_docker_image"] = "pytorch/manylinux-cuda117"
-            jobs.append({f"cmake_{os_type}_{device}": job})
-    return indent(indentation, jobs)
-
-
-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")),
-        keep_trailing_newline=True,
-    )
-
-    with open(os.path.join(d, "config.yml"), "w") as f:
-        f.write(
-            env.get_template("config.yml.in").render(
-                cmake_workflows=cmake_workflows,
-            )
-        )
diff --git a/.circleci/unittest/linux/scripts/run-clang-format.py b/.github/scripts/run-clang-format.py
similarity index 100%
rename from .circleci/unittest/linux/scripts/run-clang-format.py
rename to .github/scripts/run-clang-format.py


Test patch:
diff --git a/.circleci/smoke_test/docker/Dockerfile b/.circleci/smoke_test/docker/Dockerfile
deleted file mode 100644
--- a/.circleci/smoke_test/docker/Dockerfile
+++ /dev/null
@@ -1,34 +0,0 @@
-# this Dockerfile is for torchvision 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
-# assuming you're within the directory where this Dockerfile located
-#  $ docker build . -t torchvision/smoketest
-
-# if you want to push to aws ecr, make sure you have the rights to write to ECR, then run
-# $ eval $(aws ecr get-login --region us-east-1 --no-include-email)
-# $ export MYTAG=localbuild  ## you can choose whatever tag you like
-# $ docker tag torchvision/smoketest 308535385114.dkr.ecr.us-east-1.amazonaws.com/torchvision/smoke_test:${MYTAG}
-# $ docker push  308535385114.dkr.ecr.us-east-1.amazonaws.com/torchvision/smoke_test:${MYTAG}
-
-FROM ubuntu:latest
-
-RUN apt-get -qq update && apt-get -qq -y install curl bzip2 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 -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.7 python=3.7
-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
-CMD [ "/bin/bash"]
diff --git a/.circleci/unittest/linux/scripts/run_test.sh b/.circleci/unittest/linux/scripts/run_test.sh
deleted file mode 100755
--- a/.circleci/unittest/linux/scripts/run_test.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-eval "$(./conda/bin/conda shell.bash hook)"
-conda activate ./env
-
-python -m torch.utils.collect_env
-
-case "$(uname -s)" in
-  Darwin*)
-    # The largest macOS runner is not able to handle the regular test suite plus the transforms v2 tests at the same
-    # time due to insufficient resources. Thus, we ignore the transforms v2 tests at first and run them in a separate
-    # step afterwards.
-    GLOB='test/test_transforms_v2*'
-    pytest --junitxml=test-results/junit.xml -v --durations 20 --ignore-glob="${GLOB}"
-    eval "pytest --junitxml=test-results/junit-transforms-v2.xml -v --durations 20 ${GLOB}"
-    ;;
-  *)
-    pytest --junitxml=test-results/junit.xml -v --durations 20
-    ;;
-esac
diff --git a/.circleci/unittest/windows/scripts/run_test.sh b/.circleci/unittest/windows/scripts/run_test.sh
deleted file mode 100644
--- a/.circleci/unittest/windows/scripts/run_test.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-eval "$(./conda/Scripts/conda.exe 'shell.bash' 'hook')"
-conda activate ./env
-
-this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-source "$this_dir/set_cuda_envs.sh"
-
-python -m torch.utils.collect_env
-pytest --junitxml=test-results/junit.xml -v --durations 20