File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -6,31 +6,46 @@ In this page I will walk you through the steps to install TensorFlow C++ API ver
6
6
7
7
## Dependencies
8
8
9
- - Conda environment
9
+ - Conda
10
10
- Python 3.9.0
11
+ - GCC 5 or newer
11
12
- Bazel 3.7.2
12
13
- Protobuf 3.9.2 (must be compatible with the version of TensorFlow-built protobuf or protoc)
13
14
15
+ Check a list of supported Python version, compiler, and bazel at https://www.tensorflow.org/install/source#tested_build_configurations .
16
+
14
17
---
15
18
16
19
## Install package dependencies
17
20
18
21
### 1. Environment setup & install Python
19
- ```
22
+ ``` bash
20
23
conda create -n tfcc
21
24
conda activate tfcc
22
25
conda install python==3.9
23
26
conda update --all -y
24
27
```
25
28
26
29
### 2. Install bazel
30
+
31
+ Add bazel repository:
32
+ ``` bash
33
+ sudo apt install apt-transport-https curl gnupg
34
+ curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
35
+ sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
36
+ echo " deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
27
37
```
38
+
39
+ Install:
40
+ ``` bash
41
+ sudo apt install bazel
42
+ # or a specific version
28
43
sudo apt install bazel-3.7.2
29
44
```
30
45
31
46
### 3. Install Protobuf
32
47
33
- I suggest installing protobuf after building TensorFlow so that we can check that which version of protobuf we have to use.
48
+ I suggest installing protobuf after building TensorFlow so that we are able to check that which version of protobuf we should use.
34
49
35
50
---
36
51
73
88
7 . Rebuild with ` --config=monolithic ` if you want compile all TF C++ code into a single shared object
74
89
75
90
** optional**
76
- ```
91
+ ``` bash
77
92
bazel test --jobs=4 --cxxopt=" -D_GLIBCXX_USE_CXX11_ABI=0" -c opt \
78
93
//tensorflow/tools/lib_package:libtensorflow_test
79
94
```
You can’t perform that action at this time.
0 commit comments