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
- Request example image to local server
$ 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)"