diff --git a/tools/ci_build/get_docker_image.py b/tools/ci_build/get_docker_image.py index e656cedae5916..90947e534918d 100755 --- a/tools/ci_build/get_docker_image.py +++ b/tools/ci_build/get_docker_image.py @@ -71,11 +71,14 @@ def main(): log.info(f"Image: {full_image_name}") - dst_deps_file = Path(args.context) / "scripts" / "deps.txt" + dst_scripts_dir = Path(args.context) / "scripts" + dst_deps_file = dst_scripts_dir / "deps.txt" # The docker file may provide a special deps.txt in its docker context dir and uses that one. # Otherwise, copy a generic one from this repo's cmake dir. if not dst_deps_file.exists(): log.info(f"Copy deps.txt to : {dst_deps_file}") + if not dst_scripts_dir.exists(): + dst_scripts_dir.mkdir(parents=True, exist_ok=True) shutil.copyfile(Path(REPO_DIR) / "cmake" / "deps.txt", str(dst_deps_file)) if "manylinux" in args.dockerfile and args.multiple_repos: