forked from tensorflow/recommenders-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.sh
executable file
·48 lines (45 loc) · 1.46 KB
/
env.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! /bin/bash
#
# Copyright 2021.
# Author: Yafei Zhang ([email protected])
#
PYTHON_PATH=$HOME/python-3.7
TENSORFLOW_VERSION=1.15.2
BAZEL_DIR=$HOME/bazel-0.26.1
BAZEL_CACHE_DIR=$HOME/bazel-cache
# TODO(kimi): 860b4776177384b48cc611bdf8c7a91c may change?
_BAZEL_CACHE_DIR=$BAZEL_CACHE_DIR/_bazel_root/860b4776177384b48cc611bdf8c7a91c
TENSORFLOW_DIR=$HOME/tensorflow
TENSORFLOW_GENFILE_DIR=$_BAZEL_CACHE_DIR/execroot/org_tensorflow/bazel-out/k8-opt/bin/tensorflow/tools/pip_package/build_pip_package.runfiles/org_tensorflow
OUTPUT_INCLUDE_DIR=$(dirname "${BASH_SOURCE[0]}")/$TENSORFLOW_VERSION/tensorflow
function use() {
if test "x$1" == x; then
echo 'Use a software by changing PATH, LD_LIBRARY_PATH, MANPATH...'
echo 'Usage: use path'
return 1
fi
DIR=$1
if test -d $DIR; then
echo Use $DIR
if test -f $DIR/_bashrc; then
source $DIR/_bashrc
fi
if test -d $DIR/bin; then
export PATH=$DIR/bin:$PATH
fi
if test -d $DIR/lib; then
export LD_LIBRARY_PATH=$DIR/lib:$LD_LIBRARY_PATH
fi
if test -d $DIR/lib64; then
export LD_LIBRARY_PATH=$DIR/lib64:$LD_LIBRARY_PATH
fi
if test -d $DIR/share/man; then
export MANPATH=$DIR/share/man:$LD_LIBRARY_PATH
fi
if test -d $DIR/share/info; then
export INFOPATH=$DIR/share/info:$LD_LIBRARY_PATH
fi
fi
}
use $PYTHON_PATH
use $BAZEL_DIR