From e37d94fb2a83335029f80787258a0f94faaebf80 Mon Sep 17 00:00:00 2001 From: amdfaa <107946068+amdfaa@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:09:51 -0600 Subject: [PATCH] Update run_with_env_secrets.py --- .github/scripts/run_with_env_secrets.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/scripts/run_with_env_secrets.py b/.github/scripts/run_with_env_secrets.py index fd73d65c39..7ab01dcd30 100644 --- a/.github/scripts/run_with_env_secrets.py +++ b/.github/scripts/run_with_env_secrets.py @@ -55,9 +55,11 @@ def main(): os.environ[senv] = str(all_secrets.get(sname, "")) except KeyError as e: print(f"Could not set {senv} from secret {sname}: {e}") + env_file = f"{ os.environ.get('RUNNER_TEMP', '') }/github_env_{ os.environ.get('GITHUB_RUN_ID', '') }" if f"{ os.environ.get('ROCM', '') }" == "true": env_file = f"/tmp/github_env_{ os.environ.get('GITHUB_RUN_ID', '') }" + docker_path = shutil.which("docker") if not docker_path: run_cmd_or_die(f"bash { os.environ.get('RUNNER_TEMP', '') }/exec_script") @@ -67,7 +69,6 @@ def main(): f""" docker run \ -e PR_NUMBER \ - -e HIP_VISIBLE_DEVICES=0 \ -e RUNNER_ARTIFACT_DIR=/artifacts \ -e RUNNER_DOCS_DIR=/docs \ -e RUNNER_TEST_RESULTS_DIR=/test-results \ @@ -86,9 +87,9 @@ def main(): { os.environ.get('GPU_FLAG', '') } \ -v "{ os.environ.get('GITHUB_WORKSPACE', '') }/{ os.environ.get('REPOSITORY', '') }:/{ os.environ.get('REPOSITORY', 'work') }" \ -v "{ os.environ.get('GITHUB_WORKSPACE', '') }/test-infra:/test-infra" \ - -v "/var/home/pytorchci/actions-runner/_work/_temp/artifacts:/artifacts" \ - -v "/var/home/pytorchci/actions-runner/_work/_temp/docs:/docs" \ - -v "/var/home/pytorchci/actions-runner/_work/_temp/test-results:/test-results" \ + -v "{ os.environ.get('RUNNER_TEMP', '') }/artifacts:/artifacts" \ + -v "{ os.environ.get('RUNNER_TEMP', '') }/docs:/docs" \ + -v "{ os.environ.get('RUNNER_TEMP', '') }/test-results:/test-results" \ -v "{ os.environ.get('RUNNER_TEMP', '') }/exec_script:/exec" \ -v "{ os.environ.get('GITHUB_STEP_SUMMARY', '') }":"{ os.environ.get('GITHUB_STEP_SUMMARY', '') }" \ -w /{ os.environ.get('REPOSITORY', 'work') } \