.circleci: Add docker builds based on rev-parse (#40194)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/40194
Adds the scaffolding for doing docker builds based off git rev-parse
tags to detect changes.
Basically allows us to do our previous builds while also prepping for
the new builds by just retagging our current builds as the new ones and
telling the garbage collector not to reap them.
Should also skip out on redundant builds if the image already exists
thus saving us some compute time on docker builds.
Also adds the commands to load the calculated DOCKER_TAG from a shared
workspace file.
Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
Test Plan: Imported from OSS
Differential Revision: D22120651
Pulled By: seemethere
fbshipit-source-id: c74f10816d63f440a9e0cdd00d6fa1a25eb7a2c1