Update docker management tools and doc (#10512)
prod_digest.py is updated during the image load, and we don't use the
prod tag in CI anymore. Update the doc and remove the script to reflect
that.
diff --git a/build_tools/docker/README.md b/build_tools/docker/README.md
index c1e8b64..cf5df8c 100644
--- a/build_tools/docker/README.md
+++ b/build_tools/docker/README.md
@@ -18,12 +18,6 @@
docker run --interactive --tty --rm base
```
-Production versions of the images can be downloaded from GCR:
-
-```shell
-docker pull gcr.io/iree-oss/base:prod
-```
-
You can find more information in the
[official Docker docs](https://docs.docker.com/get-started/overview/).
@@ -93,21 +87,4 @@
4. Commit the changes and send a PR for review. The CI will use the updated
digest references to test the new images.
-5. Merge your PR after is approved and all CI tests pass. **Please remember to
- complete the step below**.
-
-### Part 3. Updating the `:prod` tag
-
-Kokoro builds preload images tagged with `prod` on VM creation, so after
-changing the images used, you should also update the images tagged as `prod`
-in GCR. This also makes development significantly easier for others who need to
-modify the `docker` images.
-
-6. We use `build_tools/docker/prod_digests.txt` as a source of truth for which
- versions of the images on GCR should have the `:prod` tag. The following
- command will ensure that you are at upstream HEAD on the `main` branch before
- it updates the tags.
-
- ```shell
- python3 build_tools/docker/manage_prod.py
- ```
+5. Merge your PR after is approved and all CI tests pass.
diff --git a/build_tools/docker/manage_prod.py b/build_tools/docker/manage_prod.py
deleted file mode 100755
index 37acd8e..0000000
--- a/build_tools/docker/manage_prod.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env python3
-
-# Copyright 2020 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Uses prod_digests.txt to update GCR's :prod tags.
-
-Usage:
- Pull all images that should have :prod tags, tag them with :prod and push
- them to GCR. This will make sure that you are at upstream head on the main
- branch before pushing:
- python3 build_tools/docker/manage_prod.py
-"""
-
-import os
-import utils
-
-if __name__ == "__main__":
- # Ensure the user has the correct authorization if they try to push to GCR.
- utils.check_gcloud_auth()
-
- # Only allow the :prod tag to be pushed from the version of
- # `prod_digests.txt` at upstream HEAD on the main branch.
- utils.run_command(
- [os.path.normpath("build_tools/scripts/git/git_update.sh"), "main"])
-
- with open(utils.PROD_DIGESTS_PATH, "r") as f:
- images_with_digests = [line.strip() for line in f.readlines()]
-
- for image_with_digest in images_with_digests:
- image_url, _ = image_with_digest.split("@")
- prod_image_url = f"{image_url}:prod"
-
- utils.run_command(["docker", "pull", image_with_digest])
- utils.run_command(["docker", "tag", image_with_digest, prod_image_url])
- utils.run_command(["docker", "push", prod_image_url])