github.com/alwaysproblem/mlserving-tutorial@v0.0.0-20221124033215-121cfddbfbf4/TFserving/ClientAPI/README.md (about) 1 # Tensorflow Serving Client API 2 3 ## **Requiement** 4 5 - Docker 6 - GO (>= 1.11) for go API 7 - Python for python API 8 9 ## **Install Docker** 10 11 - **Window/MacOS**: install Docker from [DockerHub](https://hub.docker.com/?overlay=onboarding). (*need to register new account if you are newbie*) 12 13 - **linux**: install [Docker](https://runnable.com/docker/install-docker-on-linux) 14 15 ## **Tutorial for starting** 16 17 ```bash 18 $ git clone https://github.com/Alwaysproblem/MLserving-tutorial 19 $ cd MLserving-tutorial/TFserving/ 20 ``` 21 22 ## Run Server 23 24 - here is no batch configuration only for demonstration 25 26 ```bash 27 $ docker run --rm -p 8500:8500 -p 8501:8501 -v `pwd`:/models -it tensorflow/serving --model_config_file=/models/config/versionlabels.config --model_config_file_poll_wait_seconds=60 --allow_version_labels_for_unavailable_models 28 ``` 29 30 ## Test Server 31 32 - test for network 33 34 ```bash 35 $ curl -d '{"instances": [[1.0, 2.0]]}' -X POST http://localhost:8501/v1/models/Toy_double:predict 36 ``` 37 38 ## Tutorial for gRPC API 39 40 - [GO](./go/README.md) 41 - [Python](./python/README.md) 42 - [Cpp-cmake](./cpp/cmake/README.md) 43 - [Cpp-cmake-static-lib](./cpp/cmake-static-lib/README.md) 44 - [Cpp-make](./cpp/make/README.md) 45 - [Cpp-make-static-lib](./cpp/make-static-lib/README.md)