Skip to content

Commit 3b175fb

Browse files
authored
Separate arm64 docker builds from amd64 (#5184)
As a followup after: pytorch/pytorch#125617 Add validation_runner output param to know what validation runner to use Test: ``` python tools/scripts/generate_docker_release_matrix.py {"include": [{"cuda": "11.8", "cuda_full_version": "11.8.0", "cudnn_version": "8", "image_type": "runtime", "docker": "ghcr.io/pytorch/pytorch-nightly:2.4.0.dev20240507-cuda11.8-cudnn8-runtime", "platform": "linux/amd64", "validation_runner": "linux.g5.4xlarge.nvidia.gpu"}, {"cuda": "11.8", "cuda_full_version": "11.8.0", "cudnn_version": "8", "image_type": "devel", "docker": "ghcr.io/pytorch/pytorch-nightly:2.4.0.dev20240507-cuda11.8-cudnn8-devel", "platform": "linux/amd64", "validation_runner": "linux.g5.4xlarge.nvidia.gpu"}, {"cuda": "12.1", "cuda_full_version": "12.1.1", "cudnn_version": "8", "image_type": "runtime", "docker": "ghcr.io/pytorch/pytorch-nightly:2.4.0.dev20240507-cuda12.1-cudnn8-runtime", "platform": "linux/amd64", "validation_runner": "linux.g5.4xlarge.nvidia.gpu"}, {"cuda": "12.1", "cuda_full_version": "12.1.1", "cudnn_version": "8", "image_type": "devel", "docker": "ghcr.io/pytorch/pytorch-nightly:2.4.0.dev20240507-cuda12.1-cudnn8-devel", "platform": "linux/amd64", "validation_runner": "linux.g5.4xlarge.nvidia.gpu"}, {"cuda": "12.4", "cuda_full_version": "12.4.0", "cudnn_version": "8", "image_type": "runtime", "docker": "ghcr.io/pytorch/pytorch-nightly:2.4.0.dev20240507-cuda12.4-cudnn8-runtime", "platform": "linux/amd64", "validation_runner": "linux.g5.4xlarge.nvidia.gpu"}, {"cuda": "12.4", "cuda_full_version": "12.4.0", "cudnn_version": "8", "image_type": "devel", "docker": "ghcr.io/pytorch/pytorch-nightly:2.4.0.dev20240507-cuda12.4-cudnn8-devel", "platform": "linux/amd64", "validation_runner": "linux.g5.4xlarge.nvidia.gpu"}, {"cuda": "cpu", "cuda_full_version": "", "cudnn_version": "", "image_type": "runtime", "docker": "ghcr.io/pytorch/pytorch-nightly:2.4.0.dev20240507-runtime", "platform": "linux/arm64", "validation_runner": "linux.arm64.2xlarge"}]} ```
1 parent 5c893b3 commit 3b175fb

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

tools/scripts/generate_docker_release_matrix.py

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,17 @@
2626
def generate_docker_matrix(channel: str) -> Dict[str, List[Dict[str, str]]]:
2727

2828
ret: List[Dict[str, str]] = []
29+
prefix = "ghcr.io/pytorch/pytorch"
30+
docker_image_version = ""
31+
if channel == "release":
32+
docker_image_version = f"{prefix}:{generate_binary_build_matrix.CURRENT_STABLE_VERSION}"
33+
elif channel == "test":
34+
docker_image_version = f"{prefix}-test:{generate_binary_build_matrix.CURRENT_CANDIDATE_VERSION}"
35+
else:
36+
docker_image_version = f"{prefix}-nightly:{generate_binary_build_matrix.CURRENT_NIGHTLY_VERSION}.dev{datetime.today().strftime('%Y%m%d')}"
37+
2938
for cuda in generate_binary_build_matrix.CUDA_ARCHES_DICT[channel]:
3039
version = generate_binary_build_matrix.CUDA_CUDDN_VERSIONS[cuda]
31-
32-
prefix = "ghcr.io/pytorch/pytorch"
33-
docker_image_version = ""
34-
if channel == "release":
35-
docker_image_version = f"{prefix}:{generate_binary_build_matrix.CURRENT_STABLE_VERSION}"
36-
elif channel == "test":
37-
docker_image_version = f"{prefix}-test:{generate_binary_build_matrix.CURRENT_CANDIDATE_VERSION}"
38-
else:
39-
docker_image_version = f"{prefix}-nightly:{generate_binary_build_matrix.CURRENT_NIGHTLY_VERSION}.dev{datetime.today().strftime('%Y%m%d')}"
40-
4140
for image in DOCKER_IMAGE_TYPES:
4241
ret.append(
4342
{
@@ -46,9 +45,22 @@ def generate_docker_matrix(channel: str) -> Dict[str, List[Dict[str, str]]]:
4645
"cudnn_version": version["cudnn"],
4746
"image_type": image,
4847
"docker": f"{docker_image_version}-cuda{cuda}-cudnn{version['cudnn']}-{image}",
49-
"platform": "linux/arm64,linux/amd64",
48+
"platform": "linux/amd64",
49+
"validation_runner": generate_binary_build_matrix.LINUX_GPU_RUNNER,
5050
}
5151
)
52+
53+
ret.append(
54+
{
55+
"cuda": "cpu",
56+
"cuda_full_version": "",
57+
"cudnn_version": "",
58+
"image_type": "runtime",
59+
"docker": f"{docker_image_version}-runtime",
60+
"platform": "linux/arm64",
61+
"validation_runner": generate_binary_build_matrix.LINUX_AARCH64_RUNNER,
62+
}
63+
)
5264
return {"include": ret}
5365

5466

0 commit comments

Comments
 (0)