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

Commit 940d64f

Browse files
committed
use version instead of hard code url when installing tensorflow
1 parent ee2766d commit 940d64f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

script/installation/packages.sh

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

7675
# Install C-API
7776
TFCApiURL="https://storage.googleapis.com/tensorflow/libtensorflow/${TFCApiFile}"
@@ -172,7 +171,7 @@ if [ "$DISTRO" = "UBUNTU" ]; then
172171
# Install version of protobuf needed by C-API
173172
install_protobuf3.4.0 "ubuntu"
174173
# Install tensorflow
175-
install_tf "$TFCApiFile" "$TFBinaryURL" "$LinkerConfigCmd"
174+
install_tf "$TFCApiFile" "$LinkerConfigCmd"
176175

177176
## ------------------------------------------------
178177
## DEBIAN
@@ -248,7 +247,7 @@ elif [[ "$DISTRO" == *"FEDORA"* ]]; then
248247
# Install version of protobuf needed by C-API
249248
install_protobuf3.4.0 "fedora"
250249
# Install tensorflow
251-
install_tf "$TFCApiFile" "$TFBinaryURL" "$LinkerConfigCmd"
250+
install_tf "$TFCApiFile" "$LinkerConfigCmd"
252251

253252
## ------------------------------------------------
254253
## REDHAT
@@ -353,7 +352,7 @@ elif [ "$DISTRO" = "DARWIN" ]; then
353352
brew upgrade python
354353
# Brew installs correct version of Protobuf(3.5.1 >= 3.4.0)
355354
# So we can directly install tensorflow
356-
install_tf "$TFCApiFile" "$TFBinaryURL" "$LinkerConfigCmd"
355+
install_tf "$TFCApiFile" "$LinkerConfigCmd"
357356

358357
## ------------------------------------------------
359358
## UNKNOWN

0 commit comments

Comments
 (0)