You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+110Lines changed: 110 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,116 @@ For GPU-accelerated tensorflow, ensure you do or have done the following:
101
101
102
102
Ansible will immediately ask you for your sudo password, as packages etc. will need to be installed through root user.
103
103
104
+
# Build TensorFlow from Source
105
+
106
+
> Note: As of now, if you configured to build TensorFlow from Source, you need to follow this guide after running the Ansible playbook. In the future, this should mostly be handled by Ansible.
107
+
108
+
Inside `ml/tensorflow` (default location) run `./configure`.
109
+
110
+
Here is my sample dialogue and the answers I gave to the questions:
111
+
112
+
> Note: Ensure to refer to the proper Python version you want to use! Here I compiled with Python 3.5.
113
+
114
+
```
115
+
Extracting Bazel installation...
116
+
You have bazel 0.7.0 installed.
117
+
Please specify the location of python. [Default is /usr/bin/python]: /usr/bin/python3
118
+
119
+
120
+
Found possible Python library paths:
121
+
/usr/local/lib/python3.5/dist-packages
122
+
/usr/lib/python3/dist-packages
123
+
Please input the desired Python library path to use. Default is [/usr/local/lib/python3.5/dist-packages]
124
+
125
+
Do you wish to build TensorFlow with jemalloc as malloc support? [Y/n]:
126
+
jemalloc as malloc support will be enabled for TensorFlow.
127
+
128
+
Do you wish to build TensorFlow with Google Cloud Platform support? [Y/n]: n
129
+
No Google Cloud Platform support will be enabled for TensorFlow.
130
+
131
+
Do you wish to build TensorFlow with Hadoop File System support? [Y/n]: n
132
+
No Hadoop File System support will be enabled for TensorFlow.
133
+
134
+
Do you wish to build TensorFlow with Amazon S3 File System support? [Y/n]: n
135
+
No Amazon S3 File System support will be enabled for TensorFlow.
136
+
137
+
Do you wish to build TensorFlow with XLA JIT support? [y/N]: n
138
+
No XLA JIT support will be enabled for TensorFlow.
139
+
140
+
Do you wish to build TensorFlow with GDR support? [y/N]: n
141
+
No GDR support will be enabled for TensorFlow.
142
+
143
+
Do you wish to build TensorFlow with VERBS support? [y/N]: n
144
+
No VERBS support will be enabled for TensorFlow.
145
+
146
+
Do you wish to build TensorFlow with OpenCL support? [y/N]: n
147
+
No OpenCL support will be enabled for TensorFlow.
148
+
149
+
Do you wish to build TensorFlow with CUDA support? [y/N]: y
150
+
CUDA support will be enabled for TensorFlow.
151
+
152
+
Please specify the CUDA SDK version you want to use, e.g. 7.0. [Leave empty to default to CUDA 8.0]: 9.0
153
+
154
+
155
+
Please specify the location where CUDA 9.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:
156
+
157
+
158
+
Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 6.0]: 7
159
+
160
+
161
+
Please specify the location where cuDNN 7 library is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:/usr/lib/x86_64-linux-gnu
162
+
163
+
164
+
Please specify a list of comma-separated Cuda compute capabilities you want to build with.
165
+
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus.
166
+
Please note that each additional compute capability significantly increases your build time and binary size. [Default is: 5.0]5.0
167
+
168
+
169
+
Do you want to use clang as CUDA compiler? [y/N]: n
170
+
nvcc will be used as CUDA compiler.
171
+
172
+
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]:
173
+
174
+
175
+
Do you wish to build TensorFlow with MPI support? [y/N]: n
176
+
No MPI support will be enabled for TensorFlow.
177
+
178
+
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native]:
179
+
180
+
181
+
Add "--config=mkl" to your bazel command to build with MKL support.
182
+
Please note that MKL on MacOS or windows is still not supported.
183
+
If you would like to use a local MKL instead of downloading, please set the environment variable "TF_MKL_ROOT" every time before build.
184
+
Configuration finished
185
+
```
186
+
187
+
Then trigger the building procedure (takes about 23 minutes for me):
0 commit comments