Skip to content

Commit

Permalink
binary ci: Move DLL dependencies instead of symlink for Linux CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
aoirint committed Jun 18, 2023
1 parent 77308fe commit 68a796c
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -512,26 +512,28 @@ jobs:
mv download/directml/DirectML.dll dist/run/
fi
- name: Create symlink of CUDA dependencies
- name: Gather DLL dependencies to dist/run/ (Linux CUDA)
if: startsWith(matrix.os, 'ubuntu-') && endsWith(matrix.target, 'nvidia')
shell: bash
run: |
set -eux
# Move DLL dependencies (cache already saved)
# ONNX Runtime providers (PyInstaller does not copy dynamic loaded libraries)
patchelf --set-rpath '$ORIGIN' "$(pwd)/download/onnxruntime/lib"/libonnxruntime_providers_*.so
ln -sf "$(pwd)/download/onnxruntime/lib"/libonnxruntime_*.so dist/run/
mv download/onnxruntime/lib/libonnxruntime_*.so dist/run/
# CUDA
ln -sf "$(pwd)/download/cuda/bin"/libcublas.so.* dist/run/
ln -sf "$(pwd)/download/cuda/bin"/libcublasLt.so.* dist/run/
ln -sf "$(pwd)/download/cuda/bin"/libcudart.so.* dist/run/
ln -sf "$(pwd)/download/cuda/bin"/libcufft.so.* dist/run/
ln -sf "$(pwd)/download/cuda/bin"/libcurand.so.* dist/run/
mv download/cuda/bin/libcublas.so.* dist/run/
mv download/cuda/bin/libcublasLt.so.* dist/run/
mv download/cuda/bin/libcudart.so.* dist/run/
mv download/cuda/bin/libcufft.so.* dist/run/
mv download/cuda/bin/libcurand.so.* dist/run/
# cuDNN
ln -sf "$(pwd)/download/cudnn/bin"/libcudnn.so.* dist/run/
ln -sf "$(pwd)/download/cudnn/bin"/libcudnn_*_infer.so.* dist/run/
mv download/cudnn/bin/libcudnn.so.* dist/run/
mv download/cudnn/bin/libcudnn_*_infer.so.* dist/run/
- name: Set @rpath to @executable_path
if: startsWith(matrix.os, 'macos-')
Expand Down

0 comments on commit 68a796c

Please sign in to comment.