From aae7af445f6bc95aca701dc36d34c2c5d8e21f7d Mon Sep 17 00:00:00 2001 From: OleehyO Date: Wed, 2 Apr 2025 02:48:23 +0000 Subject: [PATCH] [deps] Change onnx-gpu to manually install --- pyproject.toml | 1 - setup_platform.py | 27 --------------------------- 2 files changed, 28 deletions(-) delete mode 100644 setup_platform.py diff --git a/pyproject.toml b/pyproject.toml index 9335346..a6fd582 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,6 @@ dependencies = [ "evaluate>=0.4.3", "onnx>=1.17.0", "onnxruntime>=1.20.1", - "onnxruntime-gpu>=1.20.1 ; sys_platform == 'linux'", "opencv-python>=4.11.0.86", "optimum>=1.24.0", "pyclipper>=1.3.0.post6", diff --git a/setup_platform.py b/setup_platform.py deleted file mode 100644 index 03adc33..0000000 --- a/setup_platform.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python3 -""" -Platform-specific setup script for TexTeller. -This script detects the platform and installs the appropriate version of onnxruntime. -""" - -import platform -import subprocess -import sys - - -def install_platform_specific_dependencies(): - """Install the appropriate version of onnxruntime based on the platform.""" - system = platform.system().lower() - - if system == "linux": - print("Linux detected. Installing onnxruntime-gpu...") - subprocess.check_call([sys.executable, "-m", "pip", "install", "onnxruntime-gpu>=1.20.0"]) - else: - print(f"{system.capitalize()} detected. Installing onnxruntime...") - subprocess.check_call([sys.executable, "-m", "pip", "install", "onnxruntime>=1.20.0"]) - - print("Platform-specific dependencies installed successfully.") - - -if __name__ == "__main__": - install_platform_specific_dependencies()