Skip to content

Latest commit

 

History

History
51 lines (35 loc) · 999 Bytes

README.md

File metadata and controls

51 lines (35 loc) · 999 Bytes

ainize-run-tensorflow-example

Run on Ainize

Usage

RUN resnet API server using Docker

  • Build docker image
$ docker build -t tensorflow-serving-resnet .
  • Run docker container in your local environment.
$ docker run -p 8501:8501 -it tensorflow-serving-resnet
  • Check state of local server
$ curl http://localhost:8501/v1/models/resnet
$ base64_example() {
cat <<EOF
{
    "instances": [
        {
            "b64": "$(base64 samples/cat.jpg)"
        }
    ]
}
EOF
}

$ curl -X POST http://localhost:8501/v1/models/resnet:predict \
 -H 'Content-Type: application/json' -d "$(base64_example)"

Reference