updated wheels installation
This commit is contained in:
@@ -250,6 +250,50 @@ def install_platform_packages():
|
||||
print(f"Installing platform package {package}...")
|
||||
subprocess.run([PYTHON_PATH, "-s", "-m", "pip", "install", package])
|
||||
|
||||
def install_spconv():
|
||||
"""Simple spconv installation with correct CUDA version"""
|
||||
# Check if spconv is already installed
|
||||
try:
|
||||
import spconv.core_cc
|
||||
print("spconv is already installed and working")
|
||||
return True
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# Get CUDA version mapping
|
||||
if not hasattr(build_config, 'spconv_cuda_mapping'):
|
||||
print("No spconv_cuda_mapping in config, skipping spconv installation")
|
||||
return True
|
||||
|
||||
# Convert CUDA_VERSION (e.g. cu128 -> 12.8) for lookup
|
||||
cuda_version_for_lookup = CUDA_VERSION[2:3] + '.' + CUDA_VERSION[3:]
|
||||
cuda_suffix = build_config.spconv_cuda_mapping.get(cuda_version_for_lookup)
|
||||
|
||||
if not cuda_suffix:
|
||||
print(f"No spconv mapping for CUDA {cuda_version_for_lookup}, skipping")
|
||||
return True
|
||||
|
||||
spconv_package = f"spconv-{cuda_suffix}"
|
||||
print(f"Installing {spconv_package}...")
|
||||
|
||||
result = subprocess.run(
|
||||
[PYTHON_PATH, "-m", "pip", "install", spconv_package],
|
||||
text=True, capture_output=True
|
||||
)
|
||||
|
||||
if result.returncode != 0:
|
||||
print(f"Failed to install {spconv_package}: {result.stderr}")
|
||||
return False
|
||||
|
||||
# Verify installation
|
||||
try:
|
||||
import spconv.core_cc
|
||||
print(f"Successfully installed and verified {spconv_package}")
|
||||
return True
|
||||
except ImportError as e:
|
||||
print(f"spconv installed but verification failed: {e}")
|
||||
return False
|
||||
|
||||
def wheels_dir_exists_and_not_empty(builds_dir):
|
||||
if not os.path.exists(builds_dir):
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user