Skip to content

Commit

Permalink
Rename knnlib to lib (#345)
Browse files Browse the repository at this point in the history
Signed-off-by: John Mazanec <[email protected]>
  • Loading branch information
jmazanec15 committed May 3, 2022
1 parent f2d0ebb commit fed7352
Showing 1 changed file with 7 additions and 7 deletions.
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

0 comments on commit fed7352

Please sign in to comment.