Update the TFLM CI docs based on the new way to build a docker image.
This commit is contained in:
parent
102e1f9855
commit
83cc821a93
@ -1,3 +1,5 @@
|
||||
<!-- mdformat off(b/169948621#comment2) -->
|
||||
|
||||
<!--
|
||||
Semi-automated TOC generation with instructions from
|
||||
https://github.com/ekalinin/github-markdown-toc#auto-insert-and-update-toc
|
||||
@ -314,24 +316,35 @@ that can be expanded and improved as necessary.
|
||||
|
||||
[](https://storage.googleapis.com/tensorflow-kokoro-build-badges/tflite-micro.html)
|
||||
|
||||
* Most of the tests that are run as part of the CI are with the
|
||||
* Tests that are run as part of the CI are with the
|
||||
[micro/tools/ci_build/test_all.sh](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/tools/ci_build/test_all.sh)
|
||||
script.
|
||||
|
||||
* There are a few additional tests that use bazel that are not
|
||||
captured by the `test_all.sh` script.
|
||||
script when run with the `GITHUB_PRESUBMIT` command line parameter:
|
||||
```
|
||||
tensorflow/lite/micro/tools/ci_build/test_all.sh GITHUB_PRESUBMIT
|
||||
```
|
||||
|
||||
* If an error is not reproducible on your development machine, you can
|
||||
recreate the docker container that is used on the CI servers with the
|
||||
following commands (run from the root of the tensorflow github repo):
|
||||
recreate the docker container that is used on the CI servers.
|
||||
|
||||
* First, create a build a TFLM docker image with:
|
||||
```
|
||||
mkdir /tmp/tflm-docker
|
||||
docker build -f tensorflow/tools/ci_build/Dockerfile.micro -t tflm /tmp/tflm-docker
|
||||
docker run -v `pwd`:/tensorflow -it tflm bash
|
||||
tensorflow/tools/ci_build/ci_build.sh micro bash
|
||||
```
|
||||
The second parameter to the ci_build.sh script is not important. It can
|
||||
be any command.
|
||||
|
||||
* Next, mount the tensorflow repo on your machine to the docker container.
|
||||
Please be careful (or make a separate clone of tensorflow) since any
|
||||
changes docker container will also be reflected in the directory in the
|
||||
host machine.
|
||||
```
|
||||
docker run -v `pwd`:/tensorflow -it tf_ci.micro bash
|
||||
```
|
||||
|
||||
The `docker run` command is mounting the tensorflow repository on your
|
||||
machine to the docker containter. As a result, any changes made within the
|
||||
docker container will also be reflected in the directory in the host
|
||||
machine.
|
||||
* Within the docker container, you can now run the TFLM test script, or
|
||||
any other command that you would like to test. For example, the following
|
||||
commands will run all of the TFLM checks:
|
||||
```
|
||||
# cd tensorflow
|
||||
# tensorflow/lite/micro/tools/ci_build/test_all.sh GITHUB_PRESUBMIT
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user