Hotfix torch installation (#83)

* Hotfix torch installation

* Hotfix torch installation
This commit is contained in:
Henry Ruhs
2023-09-07 01:26:33 +02:00
committed by GitHub
parent bf3be6f73c
commit 7f69889c95
4 changed files with 7 additions and 15 deletions

View File

@@ -35,7 +35,11 @@ def run() -> None:
onnxruntime_key = answers['onnxruntime_key']
onnxruntime_name, onnxruntime_version = ONNXRUNTIMES[onnxruntime_key]
python_id = 'cp' + str(sys.version_info.major) + str(sys.version_info.minor)
subprocess.call([ 'pip', 'install', '-r', 'requirements.txt' ])
subprocess.call([ 'pip', 'uninstall', 'torch', '-y' ])
if onnxruntime_key == 'cuda':
subprocess.call([ 'pip', 'install', '-r', 'requirements.txt', '--extra-index-url', 'https://download.pytorch.org/whl/cu118' ])
else:
subprocess.call([ 'pip', 'install', '-r', 'requirements.txt' ])
if onnxruntime_key != 'cpu':
subprocess.call([ 'pip', 'uninstall', 'onnxruntime', onnxruntime_name, '-y' ])
if onnxruntime_key != 'coreml-silicon':