Skip to content

Commit ed7bee3

Browse files
committed
move CUDA environment variables from GitHub Action before-all to pyproject
1 parent fc780ee commit ed7bee3

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ jobs:
2727
export CUDA_ROOT=/usr/local/cuda-11.8
2828
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.8/lib64
2929
export CUDACXX=/usr/local/cuda-11.8/bin/nvcc
30-
nvcc --version
31-
ls -l $CUDACXX
3230
# For Windows, install CUDA
3331
CIBW_BEFORE_ALL_WINDOWS: |
3432
cd src/deepwave

pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,20 @@ test-requires = "pytest scipy torch"
5151
test-command = "pytest {project}/tests"
5252
# Don't bundle CUDA libraries with the wheel
5353
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel} --exclude libcuda.so.1 --exclude 'libcudart.so.*'"
54+
environment = {
55+
PATH="$PATH:/usr/local/cuda-11.8/bin",
56+
CUDA_HOME="/usr/local/cuda-11.8",
57+
CUDA_ROOT="/usr/local/cuda-11.8",
58+
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda-11.8/lib64",
59+
CUDACXX="/usr/local/cuda-11.8/bin/nvcc"
60+
}
5461

5562
[tool.cibuildwheel.windows]
5663
test-command = "pytest {project}/tests/test_scalar.py"
64+
environment = {
65+
CUDA_PATH="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.4",
66+
PATH="$PATH:C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.4\\bin"
67+
}
5768

5869
[tool.cibuildwheel.macos]
5970
test-command = "pytest {project}/tests/test_scalar.py"

0 commit comments

Comments
 (0)