@@ -134,8 +134,15 @@ but maybe this doc can help you : [Extract headers from TensorFlow compiling dir
134
134
At the same time, we find some OPs used by TRFA have better performance, so we highly recommend you update TensorFlow to 2.x.
135
135
136
136
#### Installing from Source
137
+
138
+ For all developers, we recommend you use the development docker containers which are all GPU enabled:
139
+ ``` shell
140
+ docker pull tfra/dev_container:latest-python3.8 # "3.7", "3.9" are all avaliable.
141
+ docker run --privileged --gpus all -it --rm -v $( pwd) :$( pwd) tfra/dev_container:latest-3.8
142
+ ```
143
+
137
144
##### CPU Only
138
- You can also install from source. This requires the [ Bazel] ( https://bazel.build/ ) build system (version == 3.7.2 ).
145
+ You can also install from source. This requires the [ Bazel] ( https://bazel.build/ ) build system (version == 5.1.1 ).
139
146
Please install a TensorFlow on your compiling machine, The compiler needs to know the version of Tensorflow and
140
147
its headers according to the installed TensorFlow.
141
148
@@ -158,18 +165,20 @@ pip install artifacts/tensorflow_recommenders_addons-*.whl
158
165
##### GPU Support
159
166
Only ` TF_NEED_CUDA=1 ` is required and other environment variables are optional:
160
167
``` shell
161
- PY_VERSION=" 3.7" \
162
- TF_NEED_CUDA=1 \
163
- TF_CUDA_VERSION=11.2 \
164
- TF_CUDNN_VERSION=8.1 \
165
- CUDA_TOOLKIT_PATH=" /usr/local/cuda" \
166
- CUDNN_INSTALL_PATH=" /usr/lib/x86_64-linux-gnu" \
168
+ export TF_VERSION=" 2.5.1" # "2.7.0", "2.5.1" are well tested.
169
+ export PY_VERSION=" 3.8"
170
+ export TF_NEED_CUDA=1
171
+ export TF_CUDA_VERSION=11.2
172
+ export TF_CUDNN_VERSION=8.1
173
+ export CUDA_TOOLKIT_PATH=" /usr/local/cuda"
174
+ export CUDNN_INSTALL_PATH=" /usr/lib/x86_64-linux-gnu"
175
+
167
176
python configure.py
168
177
```
169
178
And then build the pip package and install:
170
179
``` shell
171
180
bazel build --enable_runfiles build_pip_pkg
172
- TF_NEED_CUDA=1 bazel-bin/build_pip_pkg artifacts
181
+ bazel-bin/build_pip_pkg artifacts
173
182
pip install artifacts/tensorflow_recommenders_addons_gpu-* .whl
174
183
```
175
184
##### Apple Silicon Support (Beta Release)
0 commit comments