This commit is contained in:
Changming Sun 2025-02-06 16:27:19 -08:00
parent db2d590a3e
commit 2eec561ec1
2 changed files with 10 additions and 2 deletions

View file

@ -1051,6 +1051,10 @@ def generate_vcpkg_install_options(source_dir, args):
if "AGENT_TEMPDIRECTORY" in os.environ:
temp_dir = os.environ["AGENT_TEMPDIRECTORY"]
vcpkg_install_options.append(f"--x-buildtrees-root={temp_dir}")
SYSTEM_COLLECTIONURI = os.getenv("SYSTEM_COLLECTIONURI") # noqa: N806
# Config asset cache
terrapin_cmd_path = shutil.which("TerrapinRetrievalTool")
if terrapin_cmd_path is None:
terrapin_cmd_path = "C:\\local\\Terrapin\\TerrapinRetrievalTool.exe"
@ -1063,7 +1067,6 @@ def generate_vcpkg_install_options(source_dir, args):
+ " -b https://vcpkg.storage.devpackages.microsoft.io/artifacts/ -a true -u Environment -p {url} -s {sha512} -d {dst}\\;x-block-origin"
)
else:
SYSTEM_COLLECTIONURI = os.getenv("SYSTEM_COLLECTIONURI") # noqa: N806
if (
SYSTEM_COLLECTIONURI == "https://dev.azure.com/onnxruntime/"
or SYSTEM_COLLECTIONURI == "https://dev.azure.com/aiinfra/"
@ -1072,6 +1075,12 @@ def generate_vcpkg_install_options(source_dir, args):
vcpkg_install_options.append(
"--x-asset-sources=x-azurl,https://vcpkg.storage.devpackages.microsoft.io/artifacts/\\;x-block-origin"
)
if SYSTEM_COLLECTIONURI == "https://dev.azure.com/onnxruntime/":
vcpkg_install_options.append(" --binarysource=x-az-universal,onnxruntime,onnxruntime,onnxruntime,rw")
elif SYSTEM_COLLECTIONURI == "https://dev.azure.com/aiinfra/"
or SYSTEM_COLLECTIONURI == "https://aiinfra.visualstudio.com/":
vcpkg_install_options.append(" --binarysource=x-az-universal,aiinfra,Lotus,Lotus,rw")
# Config binary cache
return vcpkg_install_options

View file

@ -110,7 +110,6 @@ DOCKER_RUN_PARAMETER="--volume $SOURCE_ROOT:/onnxruntime_src \
--volume $BUILD_DIR:/build \
--volume /data/models:/build/models:ro \
--volume /data/onnx:/data/onnx:ro \
--volume $HOME/.cache/onnxruntime:/home/onnxruntimedev/.cache/onnxruntime \
--volume $HOME/.onnx:/home/onnxruntimedev/.onnx"
if [ $BUILD_DEVICE = "openvino" ] && [[ $BUILD_EXTR_PAR == *"--use_openvino GPU_FP"* ]]; then
DOCKER_RUN_PARAMETER="$DOCKER_RUN_PARAMETER --device /dev/dri:/dev/dri"