From 9c10abcd4521a8125cfd371fc74e9b2a7f4b4c0e Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 28 May 2025 13:08:14 -0700 Subject: [PATCH] Remove cache URL settings --- src/run-build-script-in-docker/index.js | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/src/run-build-script-in-docker/index.js b/src/run-build-script-in-docker/index.js index ec3ec28..03a81ba 100644 --- a/src/run-build-script-in-docker/index.js +++ b/src/run-build-script-in-docker/index.js @@ -46,10 +46,10 @@ async function checkGpu() { core.info('NVIDIA GPU detected via nvidia-smi.'); hasGpu = true; } else { - core.warning(`nvidia-smi command failed or not found (exit code: ${exitCode}). Assuming no GPU.`); + core.info(`nvidia-smi command failed or not found (exit code: ${exitCode}). Assuming no GPU.`); } } catch (error) { - core.warning(`Error trying to execute nvidia-smi: ${error.message}. Assuming no GPU.`); + core.info(`Error trying to execute nvidia-smi: ${error.message}. Assuming no GPU.`); } return hasGpu; } @@ -81,12 +81,10 @@ async function run() { // --- Validate Mode --- let buildPyArg; - let shouldPassCacheVars = false; const lowerCaseRunMode = runMode.toLowerCase(); switch (lowerCaseRunMode) { case 'update': buildPyArg = '--update'; - shouldPassCacheVars = true; break; case 'build': buildPyArg = '--build'; @@ -99,7 +97,7 @@ async function run() { return; } core.info( - `Running mode: ${runMode} (build.py arg: ${buildPyArg}), Pass Cache Vars: ${shouldPassCacheVars}, Container User: ${containerUser || 'Default'}` + `Running mode: ${runMode} (build.py arg: ${buildPyArg}), Container User: ${containerUser || 'Default'}` ); // --- Check if Python bindings are being built --- @@ -241,20 +239,7 @@ async function run() { dockerArgs.push('-w', '/onnxruntime_src'); dockerArgs.push('-e', `ALLOW_RELEASED_ONNX_OPSET_ONLY=${allowOpset}`); dockerArgs.push('-e', `NIGHTLY_BUILD=${nightlyBuild}`); - if (shouldPassCacheVars) { - core.info('Passing cache env vars into container.'); - const cacheUrl = process.env.ACTIONS_CACHE_URL || ''; - const runtimeToken = process.env.ACTIONS_RUNTIME_TOKEN || ''; - if (cacheUrl) core.setSecret(cacheUrl); - if (runtimeToken) core.setSecret(runtimeToken); - if (cacheUrl) dockerArgs.push('-e', `ACTIONS_CACHE_URL=${cacheUrl}`); - else core.info('ACTIONS_CACHE_URL not found.'); - if (runtimeToken) dockerArgs.push('-e', `ACTIONS_RUNTIME_TOKEN=${runtimeToken}`); - else core.info('ACTIONS_RUNTIME_TOKEN not found.'); - dockerArgs.push('-e', 'RUNNER_TEMP=/onnxruntime_src/build'); - } else { - core.info('Skipping passing cache env vars.'); - } + dockerArgs.push('-e', 'RUNNER_TEMP=/onnxruntime_src/build'); dockerArgs.push(dockerImage); // Pass the full command sequence dockerArgs.push('/bin/bash', '-c', fullDockerCommand);