mirror of
https://github.com/ml-explore/mlx.git
synced 2025-10-19 16:48:10 +08:00
Install linux with mlx[cuda] and mlx[cpu] (#2356)
* install linux with mlx[cuda] and mlx[cpu] * temp for testing * cleanup circle, fix cuda repair * update circle * update circle * decouple python bindings from core libraries
This commit is contained in:
@@ -1,17 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
auditwheel repair dist/* \
|
||||
--plat manylinux_2_35_x86_64 \
|
||||
--plat manylinux_2_39_x86_64 \
|
||||
--exclude libcublas* \
|
||||
--exclude libnvrtc*
|
||||
--exclude libnvrtc* \
|
||||
-w wheel_tmp
|
||||
|
||||
cd wheelhouse
|
||||
|
||||
mkdir wheelhouse
|
||||
cd wheel_tmp
|
||||
repaired_wheel=$(find . -name "*.whl" -print -quit)
|
||||
unzip -q "${repaired_wheel}"
|
||||
core_so=$(find mlx -name "core*.so" -print -quit)
|
||||
rpath=$(patchelf --print-rpath "${core_so}")
|
||||
rpath=$rpath:\$ORIGIN/../nvidia/cublas/lib:\$ORIGIN/../nvidia/cuda_nvrtc/lib
|
||||
patchelf --force-rpath --set-rpath "$rpath" "$core_so"
|
||||
rm "${repaired_wheel}"
|
||||
mlx_so="mlx/lib/libmlx.so"
|
||||
rpath=$(patchelf --print-rpath "${mlx_so}")
|
||||
base="\$ORIGIN/../../nvidia"
|
||||
rpath=$rpath:${base}/cublas/lib:${base}/cuda_nvrtc/lib
|
||||
patchelf --force-rpath --set-rpath "$rpath" "$mlx_so"
|
||||
python ../python/scripts/repair_record.py ${mlx_so}
|
||||
|
||||
# Re-zip the repaired wheel
|
||||
zip -r -q "${repaired_wheel}" .
|
||||
zip -r -q "../wheelhouse/${repaired_wheel}" .
|
||||
|
Reference in New Issue
Block a user