From daea35df5c11d893f37113cf0949a464966f7424 Mon Sep 17 00:00:00 2001 From: PyTorch MergeBot Date: Fri, 10 Oct 2025 04:20:51 +0000 Subject: [PATCH] Revert "[CD] Do not propagate download.pytorch.org IP into container (#165075)" This reverts commit 6d27a8e5093ee2a21d44dceeeffcb272e6e0f655. Reverted https://github.com/pytorch/pytorch/pull/165075 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](https://github.com/pytorch/pytorch/pull/165075#issuecomment-3388228013)) --- .github/actions/linux-test/action.yml | 2 ++ .github/actions/test-pytorch-binary/action.yml | 4 ++++ .github/workflows/_linux-test.yml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/.github/actions/linux-test/action.yml b/.github/actions/linux-test/action.yml index f29d776402ba..32fe1d7385b1 100644 --- a/.github/actions/linux-test/action.yml +++ b/.github/actions/linux-test/action.yml @@ -274,6 +274,8 @@ runs: -w /var/lib/jenkins/workspace \ "${DOCKER_IMAGE}" ) + # Propagate download.pytorch.org IP to container + grep download.pytorch.org /etc/hosts | docker exec -i "${container_name}" sudo bash -c "/bin/cat >> /etc/hosts" echo "DOCKER_CONTAINER_ID=${container_name}" >> "${GITHUB_ENV}" docker exec -t "${container_name}" sh -c "pip install $(echo dist/*.whl)[opt-einsum] && ${TEST_COMMAND}" diff --git a/.github/actions/test-pytorch-binary/action.yml b/.github/actions/test-pytorch-binary/action.yml index 991cf9fb87ef..d4b8be8b609a 100644 --- a/.github/actions/test-pytorch-binary/action.yml +++ b/.github/actions/test-pytorch-binary/action.yml @@ -33,6 +33,10 @@ runs: ) echo "CONTAINER_NAME=${container_name}" >> "$GITHUB_ENV" + if [[ "${GPU_ARCH_TYPE}" != "rocm" && "${BUILD_ENVIRONMENT}" != "linux-aarch64-binary-manywheel" && "${BUILD_ENVIRONMENT}" != "linux-s390x-binary-manywheel" && "${GPU_ARCH_TYPE}" != "xpu" ]]; then + # Propagate download.pytorch.org IP to container. This is only needed on Linux non aarch64 runner + grep download.pytorch.org /etc/hosts | docker exec -i "${container_name}" bash -c "/bin/cat >> /etc/hosts" + fi docker exec -t -w "${PYTORCH_ROOT}" "${container_name}" bash -c "bash .circleci/scripts/binary_populate_env.sh" # Generate test script diff --git a/.github/workflows/_linux-test.yml b/.github/workflows/_linux-test.yml index 89f13d3fea8f..5fa116d74e6e 100644 --- a/.github/workflows/_linux-test.yml +++ b/.github/workflows/_linux-test.yml @@ -389,6 +389,8 @@ jobs: "${DOCKER_IMAGE}" \ ${DOCKER_SHELL_CMD} ) + # Propagate download.pytorch.org IP to container + grep download.pytorch.org /etc/hosts | docker exec -i "${container_name}" sudo bash -c "/bin/cat >> /etc/hosts" echo "DOCKER_CONTAINER_ID=${container_name}" >> "${GITHUB_ENV}" if [[ ${BUILD_ENVIRONMENT} == *"s390x"* ]]; then