Skip to content

Commit

Permalink
linux-arm64 fixes to package the right dependencies into tensorflow n…
Browse files Browse the repository at this point in the history
…ative jar
  • Loading branch information
Ubuntu committed Jun 19, 2024
1 parent 3a5f1ed commit 5c23ce5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ if [[ -n "$WHEEL_URL" ]]; then
curl -L $WHEEL_URL --output 'tensorflow.whl'
fi
yes | unzip -q -u 'tensorflow.whl' # use 'yes' because for some reasons -u does not work on Windows
if [[ "$PLATFORM" == "linux-arm64" ]]; then
cp $DOWNLOAD_FOLDER/tensorflow.libs/* $DOWNLOAD_FOLDER/tensorflow/
fi
fi

if [[ -n "$CLIB_URL" ]]; then
Expand All @@ -51,6 +54,9 @@ cd tensorflow
if [[ "$PLATFORM" =~ "linux" ]]; then
ln -fs libtensorflow_cc.so.2 libtensorflow_cc.so
ln -fs libtensorflow_framework.so.2 libtensorflow_framework.so
if [[ "$PLATFORM" == "linux-arm64" ]]; then
ln -fs libomp-*.so.5 libomp.so
fi
elif [[ "$PLATFORM" =~ "macosx" ]]; then
ln -fs libtensorflow_cc.2.dylib libtensorflow_cc.dylib
ln -fs libtensorflow_framework.2.dylib libtensorflow_framework.dylib
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
},
link = {"[email protected]", "[email protected]"},
resource = {"LICENSE", "THIRD_PARTY_TF_JNI_LICENSES"}),
@Platform(
value = {"linux-arm64"},
link = {"[email protected]", "[email protected]", "[email protected]"}),
@Platform(
value = "windows",
preload = {
Expand Down

0 comments on commit 5c23ce5

Please sign in to comment.