@@ -38,22 +38,44 @@ jobs:
3838 CIBW_BUILD : " cp311-*linux*"
3939 CIBW_MANYLINUX_X86_64_IMAGE : " quay.io/pypa/manylinux_2_28_x86_64:latest"
4040 CIBW_BEFORE_BUILD : |
41- # Install CUDA toolkit
42- # For manylinux containers, you may need to install CUDA manually
43- # Option 1: Use system package manager (if available)
44- yum install -y cuda-toolkit-12-4 2>/dev/null || \
45- apt-get update && apt-get install -y nvidia-cuda-toolkit 2>/dev/null || \
46- echo "CUDA toolkit installation skipped - may need manual setup"
41+ # Install CUDA toolkit for manylinux containers
42+ # Note: CUDA installation in manylinux containers is complex
43+ # Consider using a CUDA-enabled base image or pre-installing CUDA
44+
45+ echo "Setting up CUDA environment..."
46+
47+ # Try to find existing CUDA installation
48+ if [ -d "/usr/local/cuda" ]; then
49+ export CUDA_HOME=/usr/local/cuda
50+ elif [ -d "/opt/cuda" ]; then
51+ export CUDA_HOME=/opt/cuda
52+ else
53+ # Try to install CUDA via package manager
54+ if command -v yum &> /dev/null; then
55+ # For RHEL/CentOS/AlmaLinux - try to add CUDA repo and install
56+ echo "Attempting to install CUDA via yum..."
57+ yum install -y wget || true
58+ # Note: This may require manual setup of CUDA repository
59+ # For production, consider using a CUDA-enabled Docker image
60+ fi
61+
62+ # Default CUDA_HOME if installation fails
63+ export CUDA_HOME=/usr/local/cuda
64+ mkdir -p $CUDA_HOME/bin $CUDA_HOME/lib64 || true
65+ fi
4766
4867 # Set CUDA environment variables
49- export CUDA_HOME=/usr/local/cuda
50- export PATH=$PATH:/usr/local/cuda/bin
51- export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
68+ export PATH=$PATH:$CUDA_HOME/bin
69+ export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
5270
5371 # Verify CUDA if available
5472 if command -v nvcc &> /dev/null; then
55- echo "CUDA compiler version:"
56- nvcc --version || true
73+ echo "CUDA compiler found:"
74+ nvcc --version
75+ else
76+ echo "Warning: CUDA compiler (nvcc) not found"
77+ echo "CUDA_HOME: $CUDA_HOME"
78+ echo "You may need to install CUDA manually or use a CUDA-enabled base image"
5779 fi
5880 CIBW_ENVIRONMENT : " CUDA_HOME=/usr/local/cuda PATH=$PATH:/usr/local/cuda/bin LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH"
5981 CIBW_CONFIG_SETTINGS : " wheel.build-tag=${{ github.run_number }}"
0 commit comments