From 7ff699d02979c5d2e3bd60ef7478ca413d6a2780 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20KUBLER?= <gregoire.kubler@proton.me>
Date: Fri, 29 Nov 2024 15:09:18 +0100
Subject: [PATCH] fix : auditwheel repair re enabled and added --exclude flag
 on all cuda libraries

For more informations see related issue
Closes #32 (for good this time)
---
 .gitlab-ci.yml | 2 +-
 pyproject.toml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ab168fa..93ba469 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -43,7 +43,7 @@ release:pip:ubuntu:
       CUDA_MAJOR_VERSION='12'
       CUDA_MINOR_VERSION='4'
       SEARCH_PATH='/home/ubuntu/builds/$CI_RUNNER_SHORT_TOKEN/$CI_CONCURRENT_ID'
-      CIBW_REPAIR_WHEEL_COMMAND=''
+      CIBW_REPAIR_WHEEL_COMMAND='auditwheel --verbose repair {wheel} -w {dest_dir} --exclude libcudart.so.12 --exclude libcudnn.so.9 --exclude libcublas.so.12 --exclude libcublasLt.so.12'
 
   parallel:
     matrix:
diff --git a/pyproject.toml b/pyproject.toml
index 586eb83..9816f05 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -47,7 +47,7 @@ test-command = "pytest {project}/aidge_backend_cuda/unit_tests"
 #     "cp310-manylinux_x86_64"
 # ]
 
-repair-wheel-command = ""
+repair-wheel-command = "auditwheel --verbose repair {wheel} -w {dest_dir} --exclude libcudart.so.12 --exclude libcudnn.so.9 --exclude libcublas.so.12 --exclude libcublasLt.so.12"
 
 [tool.cibuildwheel.container-engine]
 # pass command line options to 'docker run'
-- 
GitLab