Skip to content

Commit fa24b68

Browse files
committed
NO-JIRA: fix(runtime/*/Dockerfile*): use env substitution to avoid adding empty entry to LD_LIBRARY_PATH (#2656)
``` + cd arrow + export ARROW_HOME=/usr/local + ARROW_HOME=/usr/local /bin/bash: line 15: LD_LIBRARY_PATH: unbound variable Error: building at STEP "RUN --mount=type=cache,target=/root/.cache/pip --mount=type=cache,target=/root/.cache/dnf /bin/bash <<'EOF'": while running runtime: exit status 1 ```
1 parent b00f118 commit fa24b68

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ RUN /bin/bash <<'EOF'
6161
set -Eeuxo pipefail
6262
if [ "$TARGETARCH" = "ppc64le" ]; then cat > /etc/profile.d/ppc64le.sh <<'PROFILE_EOF'
6363
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
64-
export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib:$LD_LIBRARY_PATH
64+
export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
6565
export OPENBLAS_VERSION=0.3.30
6666
export ONNX_VERSION=1.19.0
6767
export PYARROW_VERSION=17.0.0
@@ -156,8 +156,8 @@ if [ "$TARGETARCH" = "s390x" ]; then
156156
cd arrow
157157
# Set environment variables for build
158158
export ARROW_HOME=/usr/local
159-
export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH
160-
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
159+
export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
160+
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
161161
# Build C++ library first
162162
cd cpp
163163
mkdir build && cd build
@@ -288,7 +288,7 @@ if [ "$TARGETARCH" = "ppc64le" ]; then
288288
pip3 install --no-cache-dir -r python/requirements-build.txt
289289
ARROW_HOME=$(pwd)/dist
290290
export ARROW_HOME
291-
LD_LIBRARY_PATH=$(pwd)/dist/lib:$LD_LIBRARY_PATH
291+
LD_LIBRARY_PATH=$(pwd)/dist/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
292292
export LD_LIBRARY_PATH
293293
export CMAKE_PREFIX_PATH=$ARROW_HOME:$CMAKE_PREFIX_PATH
294294
export PARQUET_TEST_DATA="${PWD}/cpp/submodules/parquet-testing/data"
@@ -394,7 +394,7 @@ set -Eeuxo pipefail
394394
echo "Installing softwares and packages"
395395
if [ "$TARGETARCH" = "ppc64le" ]; then
396396
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
397-
export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib:$LD_LIBRARY_PATH
397+
export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
398398
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml
399399
elif [ "$TARGETARCH" = "s390x" ]; then
400400
# For s390x, we need special flags and environment variables for building packages

0 commit comments

Comments
 (0)