Closed williamdias closed 4 years ago
Hi @williamdias
Yes, I believe it is related to that issue.
When building the docker image, we build the library natively to the machine the docker image is being built on. That machine has support for optimized instructions. I am guessing your machine does not have that support, causing the library to crash.
In this PR we disable optimizations during library build for docker image.
However, as a work around, it is probably best to build the library from source so that it is compatible with your machine. Those steps would be as follows:
docker pull centos:7
docker run -it centos:7 /bin/bash -c "yum install git cmake gcc-c++ make -y; curl -O https://download.java.net/java/GA/jdk14/076bab302c7b4508975440c56f6cc26a/36/GPL/openjdk-14_linux-x64_bin.tar.gz; tar xvf openjdk-14_linux-x64_bin.tar.gz; export JAVA_HOME=/jdk-14; git clone https://github.com/opendistro-for-elasticsearch/k-NN.git; cd k-NN; git checkout v1.9.0.0; git submodule update --init -- jni/external/nmslib; cd jni; cmake .; make;"
docker cp <containerID>:/k-NN/jni/release/libKNNIndexV1_7_3_6.so `pwd`
docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -v `pwd`/libKNNIndexV1_7_3_6.so:/usr/lib/libKNNIndexV1_7_3_6.so amazon/opendistro-for-elasticsearch:1.9.0
Could you try that and let us know if it works for you?
Jack
Hi @jmazanec15
The proposed solution worked.
Thank you!
Just ran
docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" amazon/opendistro-for-elasticsearch:1.9.0
Seems to be related to #95 and https://discuss.opendistrocommunity.dev/t/es-crashes-when-indexing-knn-vectors/3682