Update ld_library_path for k-NN in release Dockerfile #879
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: John Mazanec jmazane@amazon.com
Description
For k-NN, we needed to package a dependency to openmp in knnlib build directory. This currently works for the tar install because we set
LD_LIBRARY_PATH
env variable toplugins/opensearch-knn/knnlib
.However, this does not work for the release docker image because instead of setting
LD_LIBRARY_PATH
, we copy the lib to /usr/lib. My first attempts to fix this tried to generalize this copy statement to also copy the libomp to /usr/lib. However, this was not working. On x64, it was only looking for the libomp in /usr/lib64 and on arm it was looking for k-NN lib only in /usr/lib.To simplify, I decided to just replace copy with env set (as is done in the tar install).
To test, I built the image on AL2 arm64/x64 machines with:
I then created a bash session container with the images, ran opensearch-docker-entrypoint.sh, and confirmed knn libs load as expected when knn workload was run. Note - I was running into unrelated problems with security/perf analyzer, so I disabled them in my test.
The tars I used came from build 867, which incorporated opensearch-project/k-NN#175.
Issues Resolved
opensearch-project/k-NN#174
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.