From 44b1ff54e9d6d790293ab49e3d6bd1173b02ff08 Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Thu, 9 Oct 2025 12:37:51 -0700 Subject: [PATCH] [CD] Do not propagate download.pytorch.org IP into container (#165075) Followup after https://github.com/pytorch/pytorch/pull/164969 Should fix binary build test failures Pull Request resolved: https://github.com/pytorch/pytorch/pull/165075 Approved by: https://github.com/seemethere, https://github.com/huydhn ghstack dependencies: #164968, #164969 --- .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 deletions(-) diff --git a/.github/actions/linux-test/action.yml b/.github/actions/linux-test/action.yml index 32fe1d7385b1..f29d776402ba 100644 --- a/.github/actions/linux-test/action.yml +++ b/.github/actions/linux-test/action.yml @@ -274,8 +274,6 @@ 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 d4b8be8b609a..991cf9fb87ef 100644 --- a/.github/actions/test-pytorch-binary/action.yml +++ b/.github/actions/test-pytorch-binary/action.yml @@ -33,10 +33,6 @@ 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 5fa116d74e6e..89f13d3fea8f 100644 --- a/.github/workflows/_linux-test.yml +++ b/.github/workflows/_linux-test.yml @@ -389,8 +389,6 @@ 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