-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated linux building to target arm
- Loading branch information
1 parent
36d1f1b
commit 5d26d05
Showing
2 changed files
with
28 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
# clean tensorflow build directory | ||
cd tensorflow | ||
|
||
bazelisk clean | ||
|
||
# build base rnutime and check it was successful | ||
bazelisk build -c opt \ | ||
--repo_env=HERMETIC_PYTHON_VERSION=3.11 \ | ||
//tensorflow/lite/c:tensorflowlite_c | ||
|
||
find ./bazel-out/ -type f -name "*.so" | ||
|
||
cp $(find ./bazel-out/ -type f -name "*.so") ./libtensorflowlite_x86.so | ||
# rename and copy the output based on the current system | ||
if [[ "${RUNNER_ARCHITECTURE}" == "x64" ]]; then | ||
arch="x86" | ||
elif [[ "${RUNNER_ARCHITECTURE}" == "arm64" ]]; then | ||
arch="arm64" | ||
else | ||
echo "Unsupported architecture: ${RUNNER_ARCHITECTURE}" | ||
exit 1 | ||
fi | ||
cp $(find ./bazel-out/ -type f -name "*.so") "./libtensorflowlite_${arch}_c.so" | ||
|
||
|
||
|