2.1.2 (#271)
* Fix round issues on CLI arguments with range * Refresh face references on frame processor change * Add cuda 12 support to installer * Add cuda 12 support to installer * Add cuda 12 support to installer * Add cuda 12 support to installer * Simplify check * Simplify check
This commit is contained in:
@@ -23,7 +23,9 @@ ONNXRUNTIMES : Dict[str, Tuple[str, str]] =\
|
||||
}
|
||||
if platform.system().lower() == 'linux' or platform.system().lower() == 'windows':
|
||||
TORCH['cuda'] = 'cu118'
|
||||
TORCH['cuda-nightly'] = 'cu121'
|
||||
ONNXRUNTIMES['cuda'] = ('onnxruntime-gpu', '1.16.3')
|
||||
ONNXRUNTIMES['cuda-nightly'] = ('ort-nightly-gpu', '1.17.0.dev20231205004')
|
||||
ONNXRUNTIMES['openvino'] = ('onnxruntime-openvino', '1.16.0')
|
||||
if platform.system().lower() == 'linux':
|
||||
TORCH['rocm'] = 'rocm5.6'
|
||||
@@ -66,19 +68,24 @@ def run(program : ArgumentParser) -> None:
|
||||
torch_wheel = TORCH[torch]
|
||||
onnxruntime = answers['onnxruntime']
|
||||
onnxruntime_name, onnxruntime_version = ONNXRUNTIMES[onnxruntime]
|
||||
|
||||
subprocess.call([ 'pip', 'uninstall', 'torch', '-y', '-q' ])
|
||||
if torch_wheel == 'default':
|
||||
subprocess.call([ 'pip', 'install', '-r', 'requirements.txt' ])
|
||||
else:
|
||||
subprocess.call([ 'pip', 'install', '-r', 'requirements.txt', '--extra-index-url', 'https://download.pytorch.org/whl/' + torch_wheel ])
|
||||
if onnxruntime != 'rocm':
|
||||
if onnxruntime == 'rocm':
|
||||
if python_id in [ 'cp39', 'cp310', 'cp311' ]:
|
||||
wheel_name = 'onnxruntime_training-' + onnxruntime_version + '+rocm56-' + python_id + '-' + python_id + '-manylinux_2_17_x86_64.manylinux2014_x86_64.whl'
|
||||
wheel_path = os.path.join(tempfile.gettempdir(), wheel_name)
|
||||
wheel_url = 'https://download.onnxruntime.ai/' + wheel_name
|
||||
subprocess.call([ 'curl', '--silent', '--location', '--continue-at', '-', '--output', wheel_path, wheel_url ])
|
||||
subprocess.call([ 'pip', 'uninstall', wheel_path, '-y', '-q' ])
|
||||
subprocess.call([ 'pip', 'install', wheel_path ])
|
||||
os.remove(wheel_path)
|
||||
else:
|
||||
subprocess.call([ 'pip', 'uninstall', 'onnxruntime', onnxruntime_name, '-y', '-q' ])
|
||||
subprocess.call([ 'pip', 'install', onnxruntime_name + '==' + onnxruntime_version ])
|
||||
elif python_id in [ 'cp39', 'cp310', 'cp311' ]:
|
||||
wheel_name = 'onnxruntime_training-' + onnxruntime_version + '+rocm56-' + python_id + '-' + python_id + '-manylinux_2_17_x86_64.manylinux2014_x86_64.whl'
|
||||
wheel_path = os.path.join(tempfile.gettempdir(), wheel_name)
|
||||
wheel_url = 'https://download.onnxruntime.ai/' + wheel_name
|
||||
subprocess.call([ 'curl', '--silent', '--location', '--continue-at', '-', '--output', wheel_path, wheel_url ])
|
||||
subprocess.call([ 'pip', 'uninstall', wheel_path, '-y', '-q' ])
|
||||
subprocess.call([ 'pip', 'install', wheel_path ])
|
||||
os.remove(wheel_path)
|
||||
if onnxruntime == 'cuda-nightly':
|
||||
subprocess.call([ 'pip', 'install', onnxruntime_name + '==' + onnxruntime_version, '--extra-index-url', 'https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ort-cuda-12-nightly/pypi/simple' ])
|
||||
else:
|
||||
subprocess.call([ 'pip', 'install', onnxruntime_name + '==' + onnxruntime_version ])
|
||||
|
||||
Reference in New Issue
Block a user