-
Notifications
You must be signed in to change notification settings - Fork 1
/
tash.sh
175 lines (141 loc) · 8.29 KB
/
tash.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#!/bin/bash
OPTION1="Linux Mac-OS-X"
echo Tash: The easy, fast TensorFlow 1.0 installation
echo What is your operating system?
select opt1 in $OPTION1; do
#[Choose the operating system]
if [ "$opt1" = "Linux" ]; then
export OS=linux
OPTION3="GPU-enabled CPU-only"
echo "b) Do you want the GPU enabled binary or only CPU support?"
select opt3 in $OPTION3; do
#[Decide between Linux GPU-enabled and CPU-only support]
if [ "$opt3" = "GPU-enabled" ]; then
export Processor=gpu
echo What is version of Python are you using?
OPTION3="Python2.7 Python3.4 Python3.5"
select opt3 in $OPTION3; do
if [ "$opt3" = "Python2.7" ]; then
export PythonVersion=cp27-none
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/$OS/$Processor/tensorflow-1.0.0-$PythonVersion-linux_x86_64.whl
sudo pip install --upgrade $TF_BINARY_URL
exit
elif [ "$opt3" = "Python3.4" ]; then
export PythonVersion=cp34-cp34m
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/$OS/$Processor/tensorflow-1.0.0-$PythonVersion-linux_x86_64.whl
sudo pip3 install --upgrade $TF_BINARY_URL
exit
elif [ "$opt3" = "Python3.5" ]; then
export PythonVersion=cp35-cp35m
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/$OS/$Processor/tensorflow-1.0.0-$PythonVersion-linux_x86_64.whl
sudo pip3 install --upgrade $TF_BINARY_URL
exit
else
clear
echo Bad entry, run the script again and enter 1, or 2.
fi
done
exit
elif [ "$opt3" = "CPU-only" ]; then
export Processor=cpu
#[End Decide between Linux GPU-enabled and CPU-only support]
#[Choose the Linux Python version]
echo What is version of Python are you using?
OPTION3="Python2.7 Python3.4 Python3.5"
select opt3 in $OPTION3; do
if [ "$opt3" = "Python2.7" ]; then
export PythonVersion=cp27-none
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/$OS/$Processor/tensorflow-1.0.0-$PythonVersion-linux_x86_64.whl
sudo pip install --upgrade $TF_BINARY_URL
exit
elif [ "$opt3" = "Python3.4" ]; then
export PythonVersion=cp34-cp34m
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/$OS/$Processor/tensorflow-1.0.0-$PythonVersion-linux_x86_64.whl
sudo pip3 install --upgrade $TF_BINARY_URL
exit
elif [ "$opt3" = "Python3.5" ]; then
export PythonVersion=cp35-cp35m
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/$OS/$Processor/tensorflow-1.0.0-$PythonVersion-linux_x86_64.whl
sudo pip3 install --upgrade $TF_BINARY_URL
exit
else
clear
echo Bad entry, run the script again and enter 1, or 2.
fi
done
exit
#[End Choose the Linux Python version]
else
clear
echo Bad entry, run the script again and enter 1, or 2.
fi
done
elif [ "$opt1" = "Mac-OS-X" ]; then
export OS=mac
#[Decide between Mac-OS-X GPU-enabled and CPU-only support]
OPTION3="GPU-enabled CPU-only"
echo "b) Do you want the GPU enabled binary or only CPU support?"?
select opt3 in $OPTION3; do
if [ "$opt3" = "GPU-enabled" ]; then
export Processor=gpu
echo What is version of Python are you using?
OPTION3="Python2.7 Python3.4 Python3.5"
select opt3 in $OPTION3; do
if [ "$opt3" = "Python2.7" ]; then
export PythonVersion=py2-none-any
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/$OS/$Processor/tensorflow-0.12.1-$PythonVersion-linux_x86_64.whl
exit
elif [ "$opt3" = "Python3.4" ]; then
export PythonVersion=py3-none-any
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/$OS/$Processor/tensorflow-0.12.1-$PythonVersion-linux_x86_64.whl
exit
elif [ "$opt3" = "Python3.5" ]; then
export PythonVersion=py3-none-any
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/$OS/$Processor/tensorflow-0.12.1-$PythonVersion-linux_x86_64.whl
exit
else
clear
echo Bad entry, run the script again and enter 1, or 2.
fi
done
exit
elif [ "$opt3" = "CPU-only" ]; then
export Processor=cpu
#[End Decide between Mac-OS-X GPU-enabled and CPU-only support]
#[Choose the Mac-OS-X Python version]
echo What is version of Python are you using?
OPTION3="Python2.7 Python3.4 Python3.5"
select opt3 in $OPTION3; do
if [ "$opt3" = "Python2.7" ]; then
echo This is Python2.7
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/$OS/$Processor/tensorflow-0.12.1-py2-none-any.whl
sudo pip install --upgrade $TF_BINARY_URL
exit
elif [ "$opt3" = "Python3.4" ]; then
echo This is Python3.4
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/$OS/$Processor/tensorflow-0.12.1-py2-none-any.whl
sudo pip3 install --upgrade $TF_BINARY_URL
exit
elif [ "$opt3" = "Python3.5" ]; then
echo This is Python3.5
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/$OS/$Processor/tensorflow-0.12.1-py3-none-any.whl
sudo pip3 install --upgrade $TF_BINARY_URL
exit
else
clear
echo Bad entry, run the script again and enter 1, or 2.
fi
done
exit
#[End Choose the Mac-OS-X Python version]
else
clear
echo Bad entry, run the script again and enter 1, or 2.
fi
done
else
clear
echo Bad entry, run the script again and enter 1, or 2.
fi
#[End Choose the operating system]
done