Skip to content

Commit 6925d87

Browse files
Ensure libstdc++.so.6.0.30 only replace on x64 docker image (#5294)
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
1 parent be33c37 commit 6925d87

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docker/release/dockerfiles/opensearch.al2023.dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,13 @@ ENV PATH=$PATH:$JAVA_HOME/bin:$OPENSEARCH_HOME/bin
8585
# Add k-NN lib directory to library loading path variable
8686
ENV LD_LIBRARY_PATH="$OPENSEARCH_HOME/plugins/opensearch-knn/lib"
8787

88-
# Replace libstdc++.so.6.0.29 with libstdc++.so.6.0.30 to support k-NN avx512_spr
88+
# Replace libstdc++.so.6.0.29 with libstdc++.so.6.0.30 to support k-NN avx512_spr on x64 only
8989
# https://github.com/opensearch-project/opensearch-build/issues/5226
9090
# https://github.com/opensearch-project/k-NN/issues/2484
91-
RUN curl -SLO https://ci.opensearch.org/ci/dbc/tools/gcc/libstdcpp.so.6.0.30.stripped.tar.gz && \
92-
tar -xzf libstdcpp.so.6.0.30.stripped.tar.gz -C /lib64
91+
RUN if [ `uname -m` = "x86_64" ]; then \
92+
curl -SLO https://ci.opensearch.org/ci/dbc/tools/gcc/libstdcpp/x64/libstdcpp.so.6.0.30.stripped.tar.gz && \
93+
tar -xzf libstdcpp.so.6.0.30.stripped.tar.gz -C /lib64 && rm -v libstdcpp.so.6.0.30.stripped.tar.gz; \
94+
fi
9395

9496
# Change user
9597
USER $UID

0 commit comments

Comments
 (0)