Use docker base for clang-lint in CI (#58964)
Summary:
This PR introduces a docker base to speed up the `clang-tidy`'s dependencies stage. Originally I was looking into using the native github action cache, but the dependencies are spread across many apt and pip installation places, thus consolidating with a docker image might work better. It shortens the deps installation time from 4min down to 1min by pulling from docker base image.
Base image used: https://github.com/pytorch/test-infra/pull/15
```
FROM nvidia/cuda:10.2-devel-ubuntu18.04
RUN apt-get update && apt-get upgrade -y
RUN apt install -y software-properties-common wget
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
RUN apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main"
RUN apt-add-repository ppa:git-core/ppa
RUN apt-get update && apt-get upgrade -y && apt-get install -y git python3-dev python3-pip build-essential cmake clang-tidy-11
RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-11 1000
RUN pip3 install pyyaml typing_extensions dataclasses
```
Previous successful run of clang-tidy: https://github.com/pytorch/pytorch/runs/2671193875?check_suite_focus=true
Pull Request resolved: https://github.com/pytorch/pytorch/pull/58964
Reviewed By: samestep
Differential Revision: D28712536
Pulled By: zhouzhuojie
fbshipit-source-id: 0c48a605efe8574c104da6a0cad1a8b7853ba35e