Skip to content

Commit

Permalink
Use wrapper script to set LD_LIBRARY_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed Dec 4, 2024
1 parent 38dfc5c commit 6136b84
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions exaudfclient/base/exaudfclient.template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 0 additions & 3 deletions exaudfclient/exaudfclient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6136b84

Please sign in to comment.