Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 1.x] Rename knnlib to lib #382

Merged
merged 1 commit into from
May 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ work_dir=$PWD
git submodule update --init -- jni/external/nmslib
git submodule update --init -- jni/external/faiss

# Build knnlib
# Build knn libs
cd jni

# For x64, generalize arch so library is compatible for processors without simd instruction extensions
Expand All @@ -96,18 +96,18 @@ make opensearchknn_faiss opensearchknn_nmslib
cd $work_dir
./gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT

# Add knnlib to zip
# Add lib to zip
zipPath=$(find "$(pwd)" -path \*build/distributions/*.zip)
distributions="$(dirname "${zipPath}")"
mkdir $distributions/knnlib
cp ./jni/release/libopensearchknn* $distributions/knnlib
mkdir $distributions/lib
cp ./jni/release/libopensearchknn* $distributions/lib

# Copy libomp to be packaged with the knnlib contents
# Copy libomp to be packaged with the lib contents
ompPath=$(ldconfig -p | grep libgomp | cut -d ' ' -f 4)
cp $ompPath $distributions/knnlib
cp $ompPath $distributions/lib

cd $distributions
zip -ur $zipPath knnlib
zip -ur $zipPath lib
cd $work_dir

echo "COPY ${distributions}/*.zip"
Expand Down