From 4edda9e60a7c654e82467fdd6a69b3f38d25094a Mon Sep 17 00:00:00 2001 From: shaia Date: Tue, 6 Jan 2026 23:47:36 +0200 Subject: [PATCH] fix: Clean build artifacts and fix permissions in CUDA container - Clean previous build artifacts before building - Set HOME=/tmp to avoid permission issues with pip cache - Fix file permissions after build for host user access --- .github/workflows/build-wheels.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index bfda47e..d60aaf7 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -167,11 +167,13 @@ jobs: run: | # Build inside NVIDIA's manylinux-compatible CUDA container # Rocky Linux 8 is manylinux_2_28 compatible + # Use --user to match host UID/GID for proper file ownership docker run --rm \ -v "${{ github.workspace }}:/workspace" \ -w /workspace \ -e CFD_STATIC_LINK=ON \ -e CFD_USE_STABLE_ABI=ON \ + -e HOME=/tmp \ nvidia/cuda:12.4.0-devel-rockylinux8 \ bash -c " set -e @@ -180,6 +182,9 @@ jobs: # Install patchelf via pip (EPEL version is too old for auditwheel) python3.11 -m pip install patchelf + # Clean any previous build artifacts + rm -rf cfd/build build dist dist_raw + # Build CFD C library with CUDA # 75=Turing, 80=Ampere, 86=Ampere, 89=Ada, 90=Hopper cmake -S cfd -B cfd/build \ @@ -198,6 +203,9 @@ jobs: # Repair wheel for manylinux compatibility python3.11 -m pip install auditwheel auditwheel repair dist_raw/*.whl --plat manylinux_2_28_x86_64 -w dist/ + + # Fix permissions for host user + chmod -R 777 dist/ " echo "=== Wheel built (CUDA manylinux) ===" ls -la dist/