InsightSoftwareConsortium / ITKPythonPackage

A setup script to generate ITK Python Wheels
https://itkpythonpackage.readthedocs.io
Apache License 2.0
63 stars 21 forks source link

Fix libraries in linux module wheels #265

Closed SimonRit closed 5 months ago

SimonRit commented 5 months ago

The goal is to fix #263. The second commit inform auditwheel on where are the wheels libraries. However, it does not seem to work so far, see the wheels produced by https://github.com/RTKConsortium/ITKCudaCommon/actions/runs/7901454685 which contain renamed versions of libcuda.so and libcudart.so, e.g.:

srit@srit-Precision-5480:~/tmp$ unzip LinuxWheel310-cuda116.zip 
Archive:  LinuxWheel310-cuda116.zip
  inflating: itk_cudacommon_cuda116-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl  
  inflating: itk_cudacommon_cuda116-1.0.1-cp310-cp310-manylinux_2_28_x86_64.whl  
srit@srit-Precision-5480:~/tmp$ unzip ../itk_cudacommon_cuda116-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl  
Archive:  ../itk_cudacommon_cuda116-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   creating: itk/
   creating: itk_cudacommon_cuda116-1.0.1.dist-info/
   creating: itk_cudacommon_cuda116.libs/
   creating: itk/Configuration/
  inflating: itk/CudaCommonPython.py  
  inflating: itk/_CudaCommonPython.so  
  inflating: itk/itkCudaDataManagerPython.py  
  inflating: itk/itkCudaImageDataManagerPython.py  
  inflating: itk/itkCudaImagePython.py  
  inflating: itk/itkImageSourceCudaCommonPython.py  
  inflating: itk/itkImageToImageFilterCudaCommonPython.py  
  inflating: itk/Configuration/CudaCommonConfig.py  
  inflating: itk/Configuration/CudaCommon_snake_case.py  
  inflating: itk_cudacommon_cuda116-1.0.1.dist-info/LICENSE  
  inflating: itk_cudacommon_cuda116-1.0.1.dist-info/METADATA  
  inflating: itk_cudacommon_cuda116-1.0.1.dist-info/WHEEL  
  inflating: itk_cudacommon_cuda116-1.0.1.dist-info/top_level.txt  
  inflating: itk_cudacommon_cuda116-1.0.1.dist-info/RECORD  
  inflating: itk_cudacommon_cuda116.libs/libcudart-45da57e3.so.11.6.55  
  inflating: itk_cudacommon_cuda116.libs/libtbb-b694c9f9.so.12.9  
  inflating: itk_cudacommon_cuda116.libs/libcuda-b083b9ef.so.1  

I'll keep trying but maybe the whitelist strategy in auditwheel does not work anymore? Or I missed something? cc @LucasGandel

SimonRit commented 5 months ago

Actually audithweel has now an exclude mechanism which should remove the need for the monkey patch, see https://github.com/pypa/auditwheel/commit/0a2fdd1c122f7c196ce367d84b1e46af22ae5839. Being tested...

SimonRit commented 5 months ago

Superseded by #266