From 6136b848955ff2fe9f625578920db4478589f9a9 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Wed, 4 Dec 2024 14:41:53 -0300 Subject: [PATCH] Use wrapper script to set LD_LIBRARY_PATH --- exaudfclient/base/exaudfclient.template.sh | 3 +-- exaudfclient/exaudfclient.cc | 3 --- .../standard-EXASOL-cuda-ml-8/flavor_base/build_run/Dockerfile | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/exaudfclient/base/exaudfclient.template.sh b/exaudfclient/base/exaudfclient.template.sh index 5e93af14..882b8c24 100644 --- a/exaudfclient/base/exaudfclient.template.sh +++ b/exaudfclient/base/exaudfclient.template.sh @@ -3,5 +3,4 @@ SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" echo "Changing to script directory $SCRIPT_DIR" cd "$SCRIPT_DIR" || return 1 -export LIBEXAUDFLIB_PATH="$SCRIPT_DIR/base/libexaudflib_complete.so" -export LIBPYEXADATAFRAME_DIR="$SCRIPT_DIR/python/python3" +export LD_LIBRARY_PATH="/opt/conda/cuda-compat/:$LD_LIBRARY_PATH" diff --git a/exaudfclient/exaudfclient.cc b/exaudfclient/exaudfclient.cc index 8dd58740..e2f06442 100644 --- a/exaudfclient/exaudfclient.cc +++ b/exaudfclient/exaudfclient.cc @@ -67,9 +67,6 @@ void set_SWIGVM_params(SWIGVM_params_t* p); #endif int main(int argc, char **argv) { - const std::string origLdLibraryPath(::getenv("LD_LIBRARY_PATH")); - const std::string newLdLibraryPath = std::string("/opt/conda/cuda-compat/:") + origLdLibraryPath; - ::setenv("LD_LIBRARY_PATH", newLdLibraryPath.c_str(), 1); #ifndef UDF_PLUGIN_CLIENT #ifdef CUSTOM_LIBEXAUDFLIB_PATH std::string libexaudflibPath = string(CUSTOM_LIBEXAUDFLIB_PATH); diff --git a/flavors/standard-EXASOL-cuda-ml-8/flavor_base/build_run/Dockerfile b/flavors/standard-EXASOL-cuda-ml-8/flavor_base/build_run/Dockerfile index 1d68e1e3..0f00a52f 100644 --- a/flavors/standard-EXASOL-cuda-ml-8/flavor_base/build_run/Dockerfile +++ b/flavors/standard-EXASOL-cuda-ml-8/flavor_base/build_run/Dockerfile @@ -7,7 +7,7 @@ WORKDIR /exaudfclient/ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MAMBA_ROOT_PREFIX/lib/ ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:$MAMBA_ROOT_PREFIX/include/ -RUN ./build.sh --config no-tty --config optimize --config python --config fast-binary +RUN ./build.sh --config no-tty --config optimize --config python --config slow-wrapper RUN cp -r -L bazel-bin/* /exaudf WORKDIR /exaudfclient/base