Skip to content

Commit

Permalink
script: setup LD_LIBRARY_PATH every time.
Browse files Browse the repository at this point in the history
  • Loading branch information
ycool committed Aug 14, 2019
1 parent 71b9cdf commit 5e6cb1f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
1 change: 1 addition & 0 deletions docker/scripts/dev_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ IMG=${DOCKER_REPO}:$VERSION


function local_volumes() {
set +x
# Apollo root and bazel cache dirs are required.
volumes="-v $APOLLO_ROOT_DIR:/apollo \
-v $HOME/.cache:${DOCKER_HOME}/.cache"
Expand Down
23 changes: 10 additions & 13 deletions scripts/apollo_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,12 @@ function set_lib_path() {
if [ "$1" == "CYBER_ONLY" ]; then
PRELOAD=""
fi
export LD_LIBRARY_PATH=/usr/lib:/usr/lib/x86_64-linux-gnu
if [ "$RELEASE_DOCKER" == 1 ]; then
local CYBER_SETUP="/apollo/cyber/setup.bash"
if [ -e "${CYBER_SETUP}" ]; then
source "${CYBER_SETUP}"
fi
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/apollo/lib:/usr/local/apollo/local_integ/lib
export LD_LIBRARY_PATH=/usr/local/adolc/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/Qt5.5.1/5.5/gcc_64/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/fast-rtps/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/apollo/libtorch/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/apollo/libtorch_gpu/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/apollo/boost/lib:$LD_LIBRARY_PATH
PY_LIB_PATH=/apollo/lib
PY_TOOLS_PATH=/apollo/modules/tools
else
Expand All @@ -107,12 +101,15 @@ function set_lib_path() {
PY_LIB_PATH=${APOLLO_ROOT_DIR}/py_proto
PY_TOOLS_PATH=${APOLLO_ROOT_DIR}/modules/tools
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/apollo/lib:/apollo/bazel-genfiles/external/caffe/lib
export LD_LIBRARY_PATH=/usr/local/adolc/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/apollo/third_party/rss/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/apollo/libtorch/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/apollo/libtorch_gpu/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/apollo/boost/lib:$LD_LIBRARY_PATH
fi
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/apollo/lib:/usr/local/apollo/local_integ/lib
export LD_LIBRARY_PATH=/usr/local/adolc/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/Qt5.5.1/5.5/gcc_64/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/fast-rtps/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/apollo/libtorch/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/apollo/libtorch_gpu/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/apollo/boost/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/apollo/paddlepaddle_dep/mkldnn/lib/:$LD_LIBRARY_PATH
export LD_PRELOAD="$PRELOAD"
export PYTHONPATH=/usr/local/lib/python2.7/dist-packages:${PY_LIB_PATH}:${PY_TOOLS_PATH}:${PYTHONPATH}
if [ -e /usr/local/cuda-8.0/ ];then
Expand Down Expand Up @@ -455,8 +452,8 @@ if [ $APOLLO_IN_DOCKER = "true" ]; then
source "${CYBER_SETUP}"
fi
create_data_dir
set_lib_path $1
if [ -z $APOLLO_BASE_SOURCED ]; then
set_lib_path $1
determine_bin_prefix
export APOLLO_BASE_SOURCED=1
fi
Expand Down

0 comments on commit 5e6cb1f

Please sign in to comment.