Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 6e8560b

Browse files
committed
Merge remote-tracking branch 'upstream/master' into saatviks_tfsessionwrapper
2 parents 1b0b2c8 + 8601ad9 commit 6e8560b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2063
-1098
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
*~
1010
# Merge files created by git.
1111
*.orig
12+
# Java bytecode
13+
*.class
1214
# Byte compiled python modules.
1315
*.pyc
1416
# vim swap files

Jenkinsfile

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -141,35 +141,35 @@ pipeline {
141141
// }
142142
// }
143143

144-
stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Debug)') {
145-
agent { docker { image 'fedora:27' } }
146-
steps {
147-
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
148-
sh 'python ./script/validators/source_validator.py'
149-
sh 'mkdir build'
150-
sh 'cd build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCOVERALLS=False .. && make -j4'
151-
sh 'cd build && make check -j4'
152-
sh 'cd build && make install'
153-
sh 'cd build && bash ../script/testing/psql/psql_test.sh'
154-
sh 'sudo dnf -q install -y wget java-devel' // prerequisites for jdbc_validator
155-
sh 'cd build && python ../script/validators/jdbc_validator.py'
156-
}
157-
}
144+
// stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Debug)') {
145+
// agent { docker { image 'fedora:27' } }
146+
// steps {
147+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
148+
// sh 'python ./script/validators/source_validator.py'
149+
// sh 'mkdir build'
150+
// sh 'cd build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCOVERALLS=False .. && make -j4'
151+
// sh 'cd build && make check -j4'
152+
// sh 'cd build && make install'
153+
// sh 'cd build && bash ../script/testing/psql/psql_test.sh'
154+
// sh 'sudo dnf -q install -y wget java-devel' // prerequisites for jdbc_validator
155+
// sh 'cd build && python ../script/validators/jdbc_validator.py'
156+
// }
157+
// }
158158

159-
stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Release)') {
160-
agent { docker { image 'fedora:27' } }
161-
steps {
162-
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
163-
sh 'python ./script/validators/source_validator.py'
164-
sh 'mkdir build'
165-
sh 'cd build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
166-
sh 'cd build && make check -j4'
167-
sh 'cd build && make install'
168-
sh 'cd build && bash ../script/testing/psql/psql_test.sh'
169-
sh 'sudo dnf -q install -y wget java-devel' // prerequisites for jdbc_validator
170-
sh 'cd build && python ../script/validators/jdbc_validator.py'
171-
}
172-
}
159+
// stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Release)') {
160+
// agent { docker { image 'fedora:27' } }
161+
// steps {
162+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
163+
// sh 'python ./script/validators/source_validator.py'
164+
// sh 'mkdir build'
165+
// sh 'cd build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
166+
// sh 'cd build && make check -j4'
167+
// sh 'cd build && make install'
168+
// sh 'cd build && bash ../script/testing/psql/psql_test.sh'
169+
// sh 'sudo dnf -q install -y wget java-devel' // prerequisites for jdbc_validator
170+
// sh 'cd build && python ../script/validators/jdbc_validator.py'
171+
// }
172+
// }
173173

174174
// stage('CentOS 7/gcc-4.8.5/llvm-3.9.1 (Debug)') {
175175
// agent { docker { image 'centos:7' } }

script/installation/packages.sh

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
## * OSX
1818
## =================================================================
1919

20+
set -o errexit
2021

2122
# Determine OS platform
2223
UNAME=$(uname | tr "[:upper:]" "[:lower:]")
@@ -37,7 +38,6 @@ fi
3738
unset UNAME
3839
DISTRO=$(echo $DISTRO | tr "[:lower:]" "[:upper:]")
3940
TMPDIR=/tmp
40-
TF_VERSION="1.4.0"
4141
TF_TYPE="cpu"
4242

4343

@@ -55,14 +55,13 @@ function install_protobuf3.4.0() {
5555
echo "Only Ubuntu and Fedora is supported currently!"
5656
return 0
5757
fi
58-
CWD=`pwd`
59-
cd $TMPDIR
6058
wget -O protobuf-cpp-3.4.0.tar.gz https://github.com/google/protobuf/releases/download/v3.4.0/protobuf-cpp-3.4.0.tar.gz
6159
tar -xzf protobuf-cpp-3.4.0.tar.gz
6260
cd protobuf-3.4.0
6361
./autogen.sh && ./configure && make -j4 && sudo make install && sudo ldconfig
64-
# Do cleanup
65-
cd $CWD
62+
cd ..
63+
# Cleanup
64+
rm -rf protobuf-3.4.0 protobuf-cpp-3.4.0.tar.gz
6665
}
6766

6867
# Utility function for installing tensorflow components of python/C++
@@ -72,14 +71,16 @@ function install_tf() {
7271
LinkerConfigCmd=$3
7372
TARGET_DIRECTORY="/usr/local"
7473
# Install Tensorflow Python Binary
75-
sudo pip3 install --upgrade ${TFBinaryURL}
74+
sudo -E pip3 install --upgrade ${TFBinaryURL}
7675

7776
# Install C-API
7877
TFCApiURL="https://storage.googleapis.com/tensorflow/libtensorflow/${TFCApiFile}"
7978
wget -O $TFCApiFile $TFCApiURL
80-
sudo tar -C $TARGET_DIRECTORY -xzf $TFCApiFile
79+
sudo tar -C $TARGET_DIRECTORY -xzf $TFCApiFile || true
8180
# Configure the Linker
8281
eval $LinkerConfigCmd
82+
# Cleanup
83+
rm -rf ${TFCApiFile}
8384
}
8485

8586
## ------------------------------------------------
@@ -103,37 +104,39 @@ if [ "$DISTRO" = "UBUNTU" ]; then
103104
echo -e "\n# Added by Peloton 'packages.sh' script on $(date)\ndeb $LLVM_PKG_URL $LLVM_PKG_TARGET" | sudo tee -a /etc/apt/sources.list > /dev/null
104105
fi
105106
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 15CF4D18AF4F7421
106-
sudo apt-get update -qq
107107
CMAKE_NAME="cmake3"
108-
FORCE_Y="--force-yes"
109108
else
110109
CMAKE_NAME="cmake"
111-
FORCE_Y=""
112110
fi
113111

112+
sudo apt-get update
114113
FORCE_Y=""
115114
PKG_CMAKE="cmake"
116115
PKG_LLVM="llvm-3.7"
117116
PKG_CLANG="clang-3.7"
117+
TF_VERSION="1.4.0"
118118

119119
# Fix for cmake name change on Ubuntu 14.x and 16.x plus --force-yes deprecation
120120
if [ "$MAJOR_VER" == "14" ]; then
121121
PKG_CMAKE="cmake3"
122122
FORCE_Y="--force-yes"
123+
TF_VERSION="1.4.0"
123124
TFBinaryURL="https://storage.googleapis.com/tensorflow/linux/${TF_TYPE}/tensorflow-${TF_VERSION}-cp34-cp34m-linux_x86_64.whl"
124125
fi
125126
if [ "$MAJOR_VER" == "16" ]; then
127+
TF_VERSION="1.5.0"
126128
TFBinaryURL="https://storage.googleapis.com/tensorflow/linux/${TF_TYPE}/tensorflow-${TF_VERSION}-cp35-cp35m-linux_x86_64.whl"
127129
fi
128130
# Fix for llvm on Ubuntu 17.x
129131
if [ "$MAJOR_VER" == "17" ]; then
130132
PKG_LLVM="llvm-3.9"
131133
PKG_CLANG="clang-3.8"
134+
TF_VERSION="1.5.0"
132135
TFBinaryURL="https://storage.googleapis.com/tensorflow/linux/${TF_TYPE}/tensorflow-${TF_VERSION}-cp35-cp35m-linux_x86_64.whl"
133136
fi
134137
TFCApiFile="libtensorflow-${TF_TYPE}-linux-x86_64-${TF_VERSION}.tar.gz"
135138
LinkerConfigCmd="sudo ldconfig"
136-
sudo apt-get -qq $FORCE_Y --ignore-missing -y install \
139+
sudo apt-get -q $FORCE_Y --ignore-missing -y install \
137140
$PKG_CMAKE \
138141
$PKG_LLVM \
139142
$PKG_CLANG \
@@ -170,7 +173,7 @@ if [ "$DISTRO" = "UBUNTU" ]; then
170173
## DEBIAN
171174
## ------------------------------------------------
172175
elif [ "$DISTRO" = "DEBIAN OS" ]; then
173-
sudo apt-get -qq --ignore-missing -y install \
176+
sudo apt-get -q --ignore-missing -y install \
174177
git \
175178
g++ \
176179
clang \
@@ -201,6 +204,7 @@ elif [[ "$DISTRO" == *"FEDORA"* ]]; then
201204
26) LLVM="llvm";;
202205
*) LLVM="llvm4.0";;
203206
esac
207+
TF_VERSION="1.5.0"
204208
TFCApiFile="libtensorflow-${TF_TYPE}-linux-x86_64-${TF_VERSION}.tar.gz"
205209
TFBinaryURL="https://storage.googleapis.com/tensorflow/linux/${TF_TYPE}/tensorflow-${TF_VERSION}-cp36-cp36m-linux_x86_64.whl"
206210
LinkerConfigCmd="sudo ldconfig"
@@ -311,10 +315,12 @@ elif [[ "$DISTRO" == *"REDHAT"* ]] && [[ "${DISTRO_VER%.*}" == "7" ]]; then
311315
## DARWIN (OSX)
312316
## ------------------------------------------------
313317
elif [ "$DISTRO" = "DARWIN" ]; then
318+
set +o errexit
314319
if test ! $(which brew); then
315320
echo "Installing homebrew..."
316321
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
317322
fi
323+
TF_VERSION="1.4.0"
318324
TFBinaryURL="https://storage.googleapis.com/tensorflow/mac/${TF_TYPE}/tensorflow-${TF_VERSION}-py3-none-any.whl"
319325
TFCApiFile="libtensorflow-${TF_TYPE}-darwin-x86_64-${TF_VERSION}.tar.gz"
320326
LinkerConfigCmd="sudo update_dyld_shared_cache"
@@ -333,6 +339,7 @@ elif [ "$DISTRO" = "DARWIN" ]; then
333339
brew install [email protected]
334340
brew install postgresql
335341
brew install curl
342+
brew install wget
336343
brew install python
337344
brew upgrade python
338345
# Brew installs correct version of Protobuf(3.5.1 >= 3.4.0)

0 commit comments

Comments
 (0)