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

Commit 3531929

Browse files
committed
Revert "use version instead of hard code url when installing tensorflow"
This reverts commit 940d64f.
1 parent 940d64f commit 3531929

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

script/installation/packages.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ function install_protobuf3.4.0() {
6767
# Utility function for installing tensorflow components of python/C++
6868
function install_tf() {
6969
TFCApiFile=$1
70-
LinkerConfigCmd=$2
70+
TFBinaryURL=$2
71+
LinkerConfigCmd=$3
7172
TARGET_DIRECTORY="/usr/local"
7273
# Install Tensorflow Python Binary
73-
sudo -E pip3 install tensorflow==${TF_VERSION}
74+
sudo -E pip3 install --upgrade ${TFBinaryURL}
7475

7576
# Install C-API
7677
TFCApiURL="https://storage.googleapis.com/tensorflow/libtensorflow/${TFCApiFile}"
@@ -171,7 +172,7 @@ if [ "$DISTRO" = "UBUNTU" ]; then
171172
# Install version of protobuf needed by C-API
172173
install_protobuf3.4.0 "ubuntu"
173174
# Install tensorflow
174-
install_tf "$TFCApiFile" "$LinkerConfigCmd"
175+
install_tf "$TFCApiFile" "$TFBinaryURL" "$LinkerConfigCmd"
175176

176177
## ------------------------------------------------
177178
## DEBIAN
@@ -247,7 +248,7 @@ elif [[ "$DISTRO" == *"FEDORA"* ]]; then
247248
# Install version of protobuf needed by C-API
248249
install_protobuf3.4.0 "fedora"
249250
# Install tensorflow
250-
install_tf "$TFCApiFile" "$LinkerConfigCmd"
251+
install_tf "$TFCApiFile" "$TFBinaryURL" "$LinkerConfigCmd"
251252

252253
## ------------------------------------------------
253254
## REDHAT
@@ -352,7 +353,7 @@ elif [ "$DISTRO" = "DARWIN" ]; then
352353
brew upgrade python
353354
# Brew installs correct version of Protobuf(3.5.1 >= 3.4.0)
354355
# So we can directly install tensorflow
355-
install_tf "$TFCApiFile" "$LinkerConfigCmd"
356+
install_tf "$TFCApiFile" "$TFBinaryURL" "$LinkerConfigCmd"
356357

357358
## ------------------------------------------------
358359
## UNKNOWN

0 commit comments

Comments
 (0)