generalize circleci docker build.sh and add centos support (#41255)
Summary:
Add centos Dockerfile and support to circleci docker builds, and allow generic image names to be parsed by build.sh, so both hardcoded images and custom images can be built.
Currently only adds a ROCm centos Dockerfile.
CC ezyang xw285cornell sunway513
Pull Request resolved: https://github.com/pytorch/pytorch/pull/41255
Reviewed By: mrshenli
Differential Revision: D23003218
Pulled By: malfet
fbshipit-source-id: 562c53533e7fb9637dc2e81edb06b2242afff477