@@ -46,20 +46,14 @@ process can take longer than typical commit reviews so please bare with
4646us**
4747
4848
49- ## Development Environment
50- It is recommended that development is done in the latest
51- ` nightly-custom-op ` docker image.
49+ ## Development Tips
50+ Try these useful commands below:
5251
53- ``` bash
54- docker run --rm -it -v ${PWD} :/addons -w /addons tensorflow/tensorflow:nightly-custom-op /bin/bash
55- ```
56-
57- Try these commands below:
58-
59- * Format code automatically: ` make code-format `
60- * Run sanity check: ` make sanity-check `
61- * Run unit tests: ` make unit-test `
62- * All of the above: ` make `
52+ * Format code automatically: ` bash tools/run_docker.sh -c 'make code-format' `
53+ * Run sanity check: ` bash tools/run_docker.sh -c 'make sanity-check' `
54+ * Run CPU unit tests: ` bash tools/run_docker.sh -c 'make unit-test' `
55+ * Run GPU unit tests: ` bash tools/run_docker.sh -c 'make gpu-unit-test' `
56+ * All of the above: ` bash tools/run_docker.sh -c 'make' `
6357
6458## Coding style
6559
@@ -73,10 +67,10 @@ Please see our [Style Guide](STYLE_GUIDE.md) for more details.
7367Nighly CI tests are ran and results can be found on the central README. To
7468subscribe for alerts please join the [ addons-testing mailing list] ( https://groups.google.com/a/tensorflow.org/forum/#!forum/addons-testing ) .
7569
76- #### Locally Testing
70+ #### Locally Testing CPU
7771
7872``` bash
79- docker run --rm -it -v ${PWD} :/addons -w /addons tensorflow/tensorflow:nightly-custom-op make unit-test
73+ bash tools/run_docker.sh -c ' make unit-test'
8074```
8175
8276or run manually:
@@ -88,7 +82,25 @@ docker run --rm -it -v ${PWD}:/addons -w /addons tensorflow/tensorflow:nightly-c
8882
8983bazel test -c opt -k \
9084--test_timeout 300,450,1200,3600 \
91- --test_output=errors \
85+ --test_output=all \
86+ //tensorflow_addons/...
87+ ```
88+
89+ #### Locally Testing GPU
90+ ``` bash
91+ bash tools/run_docker.sh -d gpu -c ' make gpu-unit-test'
92+ ```
93+
94+ or run manually:
95+
96+ ``` bash
97+ docker run --runtime=nvidia --rm -it -v ${PWD} :/addons -w /addons tensorflow/tensorflow:custom-op-gpu /bin/bash
98+ ./configure.sh # Links project with TensorFlow dependency
99+
100+ bazel test -c opt -k \
101+ --test_timeout 300,450,1200,3600 \
102+ --test_output=all \
103+ --jobs=1 \
92104//tensorflow_addons/...
93105```
94106
0 commit comments