diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 53e5c7c810..aa2136d079 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -10,7 +10,6 @@ import re import shutil import subprocess import sys -import hashlib import platform from amd_hipify import amd_hipify from distutils.version import LooseVersion @@ -569,34 +568,7 @@ def install_python_deps(numpy_version=""): dep_packages.append('sympy>=1.1') dep_packages.append('packaging') dep_packages.append('cerberus') - run_subprocess([sys.executable, '-m', 'pip', 'install', '--trusted-host', - 'files.pythonhosted.org'] + dep_packages) - - -# We need to install Torch to test certain functionalities of the ORT Python package -def install_torch(): - # Command works for both Windows - run_subprocess([sys.executable, '-m', 'pip', 'install', '--trusted-host', - 'files.pythonhosted.org', 'torch===1.5.1+cu101', 'torchvision===0.6.1+cu101', - '-f', 'https://download.pytorch.org/whl/torch_stable.html']) - - -def check_md5(filename, expected_md5): - if not os.path.exists(filename): - return False - hash_md5 = hashlib.md5() - BLOCKSIZE = 1024 * 64 - with open(filename, "rb") as f: - buf = f.read(BLOCKSIZE) - while len(buf) > 0: - hash_md5.update(buf) - buf = f.read(BLOCKSIZE) - hex = hash_md5.hexdigest() - if hex != expected_md5: - log.info('md5 mismatch, expect %s, got %s' % (expected_md5, hex)) - os.remove(filename) - return False - return True + run_subprocess([sys.executable, '-m', 'pip', 'install'] + dep_packages) def setup_test_data(build_dir, configs):