-
Notifications
You must be signed in to change notification settings - Fork 0
/
default_configure.sh
executable file
·44 lines (38 loc) · 1.13 KB
/
default_configure.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
#!/usr/bin/env bash
set -eu
set -o pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd "$DIR" >/dev/null
export PYTHON_BIN_PATH=$(which python3)
export CC_OPT_FLAGS="-march=native"
export TF_NEED_JEMALLOC=1
export TF_NEED_GCP=0
export TF_NEED_HDFS=0
export TF_NEED_OPENCL=0
export TF_ENABLE_XLA=0
export TF_NEED_CUDA=0
export TF_NEED_MKL=0
export TF_NEED_MPI=0
export TF_NEED_VERBS=0
export TF_NEED_S3=0
export TF_NEED_GDR=0
export TF_NEED_OPENCL_SYCL=0
export TF_NEED_KAFKA=0
export TF_NEED_AWS=0
export TF_NEED_NGRAPH=0
export TF_CUDA_CLANG=0
export TF_DOWNLOAD_CLANG=0
export TF_SET_ANDROID_WORKSPACE=0
export PYTHON_LIB_PATH=/usr/lib/python3/dist-packages
# if you configure from within a docker container, and then outside it again
# there is this annoying file that gets owned by the file permissions in docker
# this will nuke it if that would otherwise cause configure to fail
root_gen_path="$DIR/tensorflow/tools/git/gen"
if [[ $EUID != 0 && -e "$root_gen_path" ]]; then
file_owner=$(stat -c %u "$root_gen_path")
if [[ $file_owner == 0 ]]; then
sudo rm -rf "$root_gen_path"
fi
fi
./configure
popd >/dev/null