ci: Migrate hardcoded docker builds to GHA (#67455)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/67455

Migrates docker builds that don't have dependent jobs within the pytorch
repository to our new GHA docker build job

Signed-off-by: Eli Uriegas <eliuriegas@fb.com>

Test Plan: Imported from OSS

Reviewed By: malfet, janeyx99

Differential Revision: D31997671

Pulled By: seemethere

fbshipit-source-id: 9d6f58fa8ea8731cf12457fe64dc65e70f3d9f25
This commit is contained in:
Eli Uriegas 2021-10-28 14:48:00 -07:00 committed by Facebook GitHub Bot
parent 6696c59af4
commit d0bc01fac2
5 changed files with 23 additions and 20 deletions

View File

@ -4,11 +4,8 @@ from cimodel.lib.miniutils import quote
from cimodel.data.simple.util.branch_filters import gen_filter_dict, RC_PATTERN
# TODO: make this generated from a matrix rather than just a static list
# NOTE: All hardcoded docker image builds have been migrated to GHA
IMAGE_NAMES = [
"pytorch-linux-bionic-rocm4.1-py3.6",
"pytorch-linux-bionic-rocm4.2-py3.6",
"pytorch-linux-bionic-rocm4.3.1-py3.6",
]
# This entry should be an element from the list above

9
.circleci/config.yml generated
View File

@ -6506,15 +6506,6 @@ workflows:
when: << pipeline.parameters.run_binary_tests >>
build:
jobs:
- docker_build_job:
name: "docker-pytorch-linux-bionic-rocm4.1-py3.6"
image_name: "pytorch-linux-bionic-rocm4.1-py3.6"
- docker_build_job:
name: "docker-pytorch-linux-bionic-rocm4.2-py3.6"
image_name: "pytorch-linux-bionic-rocm4.2-py3.6"
- docker_build_job:
name: "docker-pytorch-linux-bionic-rocm4.3.1-py3.6"
image_name: "pytorch-linux-bionic-rocm4.3.1-py3.6"
- pytorch_linux_build:
name: pytorch_linux_xenial_py3_6_gcc5_4_build
requires:

View File

@ -140,8 +140,6 @@ def generate_required_docker_images(items):
def gen_build_workflows_tree():
build_workflows_functions = [
# For rocm images, which don't have a circleci job equivalent
cimodel.data.simple.docker_definitions.get_workflow_jobs,
pytorch_build_definitions.get_workflow_jobs,
cimodel.data.simple.macos_definitions.get_workflow_jobs,
cimodel.data.simple.android_definitions.get_workflow_jobs,

View File

@ -531,14 +531,23 @@ BAZEL_WORKFLOWS = [
),
]
DOCKER_WORKFLOWS = [
DockerWorkflow(
build_environment="docker-builds",
docker_images=sorted({
DOCKER_IMAGES = {
f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-bionic-cuda10.2-cudnn7-py3.6-clang9", # for pytorch/xla
f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-bionic-rocm4.1-py3.6", # for rocm
f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-bionic-rocm4.2-py3.6", # for rocm
f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-bionic-rocm4.3.1-py3.6", # for rocm
}
DOCKER_IMAGES.update({
workflow.docker_image_base
for workflow in [*LINUX_WORKFLOWS, *BAZEL_WORKFLOWS]
if workflow.docker_image_base
}),
})
DOCKER_WORKFLOWS = [
DockerWorkflow(
build_environment="docker-builds",
docker_images=sorted(DOCKER_IMAGES),
# Run weekly to ensure they can build
is_scheduled="1 * */7 * *",
),

View File

@ -23,10 +23,18 @@ jobs:
strategy:
matrix:
include:
- docker_image_base: '308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-cuda10.2-cudnn7-py3.6-clang9'
docker_image_short_name: 'pytorch-linux-bionic-cuda10.2-cudnn7-py3.6-clang9'
- docker_image_base: '308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-cuda10.2-cudnn7-py3.9-gcc7'
docker_image_short_name: 'pytorch-linux-bionic-cuda10.2-cudnn7-py3.9-gcc7'
- docker_image_base: '308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-py3.6-clang9'
docker_image_short_name: 'pytorch-linux-bionic-py3.6-clang9'
- docker_image_base: '308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-rocm4.1-py3.6'
docker_image_short_name: 'pytorch-linux-bionic-rocm4.1-py3.6'
- docker_image_base: '308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-rocm4.2-py3.6'
docker_image_short_name: 'pytorch-linux-bionic-rocm4.2-py3.6'
- docker_image_base: '308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-rocm4.3.1-py3.6'
docker_image_short_name: 'pytorch-linux-bionic-rocm4.3.1-py3.6'
- docker_image_base: '308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7'
docker_image_short_name: 'pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7'
- docker_image_base: '308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7'