doniramdani820 commited on
Commit
597b4ab
Β·
verified Β·
1 Parent(s): 6be2496

Upload 12 files

Browse files
Files changed (1) hide show
  1. install-onnx.py +23 -14
install-onnx.py CHANGED
@@ -37,41 +37,50 @@ def main():
37
  """Try multiple ONNX Runtime installation approaches"""
38
  print("πŸš€ Starting aggressive ONNX Runtime installation...")
39
 
40
- # Method 1: Try standard onnxruntime-openvino
41
- print("\nπŸ“‹ Method 1: Standard onnxruntime-openvino")
42
- if run_command("pip install onnxruntime-openvino==1.15.1"):
43
  if test_onnx_import():
44
  print("πŸŽ‰ Method 1 SUCCESS!")
45
  return True
46
  else:
47
- run_command("pip uninstall -y onnxruntime-openvino", ignore_errors=True)
48
 
49
- # Method 2: Try older stable version
50
- print("\nπŸ“‹ Method 2: Older stable onnxruntime")
51
- if run_command("pip install onnxruntime==1.12.1"):
52
  if test_onnx_import():
53
  print("πŸŽ‰ Method 2 SUCCESS!")
54
  return True
55
  else:
56
  run_command("pip uninstall -y onnxruntime", ignore_errors=True)
57
 
58
- # Method 3: Try even older version
59
- print("\nπŸ“‹ Method 3: Very old onnxruntime")
60
- if run_command("pip install onnxruntime==1.11.1"):
61
  if test_onnx_import():
62
  print("πŸŽ‰ Method 3 SUCCESS!")
63
  return True
64
  else:
65
  run_command("pip uninstall -y onnxruntime", ignore_errors=True)
 
 
 
 
 
 
 
 
 
66
 
67
- # Method 4: Try CPU-only PyTorch instead
68
- print("\nπŸ“‹ Method 4: PyTorch CPU-only alternative")
69
  if run_command("pip install torch==2.0.1 --extra-index-url https://download.pytorch.org/whl/cpu"):
70
  print("βœ… PyTorch installed as ONNX Runtime alternative")
71
  return True
72
 
73
- # Method 5: Try TensorFlow Lite
74
- print("\nπŸ“‹ Method 5: TensorFlow Lite alternative")
75
  if run_command("pip install tensorflow==2.13.0"):
76
  print("βœ… TensorFlow installed as ONNX Runtime alternative")
77
  return True
 
37
  """Try multiple ONNX Runtime installation approaches"""
38
  print("πŸš€ Starting aggressive ONNX Runtime installation...")
39
 
40
+ # Method 1: Try latest available onnxruntime
41
+ print("\nπŸ“‹ Method 1: Latest available onnxruntime")
42
+ if run_command("pip install onnxruntime==1.22.1"):
43
  if test_onnx_import():
44
  print("πŸŽ‰ Method 1 SUCCESS!")
45
  return True
46
  else:
47
+ run_command("pip uninstall -y onnxruntime", ignore_errors=True)
48
 
49
+ # Method 2: Try stable version
50
+ print("\nπŸ“‹ Method 2: Stable onnxruntime")
51
+ if run_command("pip install onnxruntime==1.20.1"):
52
  if test_onnx_import():
53
  print("πŸŽ‰ Method 2 SUCCESS!")
54
  return True
55
  else:
56
  run_command("pip uninstall -y onnxruntime", ignore_errors=True)
57
 
58
+ # Method 3: Try minimum available version
59
+ print("\nπŸ“‹ Method 3: Minimum available onnxruntime")
60
+ if run_command("pip install onnxruntime==1.15.1"):
61
  if test_onnx_import():
62
  print("πŸŽ‰ Method 3 SUCCESS!")
63
  return True
64
  else:
65
  run_command("pip uninstall -y onnxruntime", ignore_errors=True)
66
+
67
+ # Method 4: Try alternative OpenVino build
68
+ print("\nπŸ“‹ Method 4: OpenVino alternative build")
69
+ if run_command("pip install onnxruntime-openvino==1.22.0"):
70
+ if test_onnx_import():
71
+ print("πŸŽ‰ Method 4 SUCCESS!")
72
+ return True
73
+ else:
74
+ run_command("pip uninstall -y onnxruntime-openvino", ignore_errors=True)
75
 
76
+ # Method 5: Try CPU-only PyTorch instead
77
+ print("\nπŸ“‹ Method 5: PyTorch CPU-only alternative")
78
  if run_command("pip install torch==2.0.1 --extra-index-url https://download.pytorch.org/whl/cpu"):
79
  print("βœ… PyTorch installed as ONNX Runtime alternative")
80
  return True
81
 
82
+ # Method 6: Try TensorFlow Lite
83
+ print("\nπŸ“‹ Method 6: TensorFlow Lite alternative")
84
  if run_command("pip install tensorflow==2.13.0"):
85
  print("βœ… TensorFlow installed as ONNX Runtime alternative")
86
  return True