-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
89 lines (79 loc) · 3.53 KB
/
Copy pathpyproject.toml
File metadata and controls
89 lines (79 loc) · 3.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
[build-system]
requires = [
"scikit-build-core",
"pybind11>=2.11.0",
"cmake>=4.0",
"ninja",
"setuptools",
"wheel",
]
build-backend = "scikit_build_core.build"
[project]
name = "cccgpu"
version = "0.2.4"
description = "The Clustermatch Correlation Coefficient (CCC) with GPU acceleration"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "BSD-2-Clause Plus Patent" }
authors = [
{ name = "Milton Pividori", email = "milton.pividori@cuanschutz.edu" },
{ name = "Haoyu Zhang", email = "haoyu_z@outlook.com" },
]
dependencies = ["numpy", "scipy", "numba", "pandas", "scikit-learn"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
]
[project.urls]
Homepage = "https://github.com/pivlab/ccc-gpu"
Issues = "https://github.com/pivlab/ccc-gpu/issues"
[project.optional-dependencies]
test = ["pytest", "pytest-cov"]
[tool.scikit-build]
# Configure scikit-build-core
cmake.version = ">=4.0"
cmake.args = [
"-DCMAKE_CUDA_ARCHITECTURES=75", # Adjust for your target CUDA architecture
]
build.verbose = true
wheel.packages = ["libs/ccc"] # Directory containing your Python packages
wheel.exclude = ["*.cpp", "*.h"] # Exclude C++ headers from wheel
# Note: wheel.py-api removed to support multiple Python versions (3.10-3.15)
wheel.platlib = true # Contains compiled extensions
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
testpaths = ["tests"]
[tool.cibuildwheel]
build = "cp3{10,11,12,13,14}-manylinux_x86_64"
manylinux-x86_64-image = "manylinux_2_28"
[tool.cibuildwheel.linux]
# Install CUDA toolkit before building wheels[tool.cibuildwheel.linux]
before-all = [
# Install yum-utils to get yum-config-manager
"yum install -y yum-utils",
# Add NVIDIA CUDA repository for RHEL 8 (manylinux_2_28 is based on AlmaLinux 8)
"yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo",
# Clean yum cache
"yum clean all",
# Install GCC 13 toolset (provides GCC 13.2 under /opt/rh/gcc-toolset-13)
"yum install -y gcc-toolset-13",
# Install CUDA 12.9 toolkit (supports GCC 6.x - 15.x, compatible with GCC 14 in manylinux_2_28)
"yum install -y cuda-toolkit-12-5",
# Print nvcc version with green prefix
"echo -e '\\033[32m[cccgpu-info]:\\033[0m'",
"nvcc --version",
# Print gcc version with green prefix
"echo -e '\\033[32m[cccgpu-info]:\\033[0m'",
"/opt/rh/gcc-toolset-13/root/usr/bin/gcc --version",
]
# Set CUDA and GCC 13 environment variables (prefer gcc-toolset-13 in PATH)
environment = { CUDA_HOME = "/usr/local/cuda", CUDACXX = "/usr/local/cuda/bin/nvcc", CC = "/opt/rh/gcc-toolset-13/root/usr/bin/gcc", CXX = "/opt/rh/gcc-toolset-13/root/usr/bin/g++", CUDAHOSTCXX = "/opt/rh/gcc-toolset-13/root/usr/bin/g++", CMAKE_C_COMPILER = "/opt/rh/gcc-toolset-13/root/usr/bin/gcc", CMAKE_CXX_COMPILER = "/opt/rh/gcc-toolset-13/root/usr/bin/g++", PATH = "/opt/rh/gcc-toolset-13/root/usr/bin:/usr/local/cuda/bin:$PATH", LD_LIBRARY_PATH = "/usr/local/cuda/lib64:/opt/rh/gcc-toolset-13/root/usr/lib64:$LD_LIBRARY_PATH" }
# Set CUDA environment variables
# environment = { CUDA_HOME="/usr/local/cuda-12.6", PATH="/usr/local/cuda-12.6/bin:$PATH", LD_LIBRARY_PATH="/usr/local/cuda-12.6/lib64:$LD_LIBRARY_PATH" }
# Test the built wheels (optional, can be disabled)
# test-requires = ["pytest", "numpy", "scipy"]
# test-command = "pytest {project}/tests -v"