Add experimental environment: tensorflow-serving (#1212)

This commit is contained in:
Ta-Ching Chen
2019-07-02 15:43:55 +08:00
committed by GitHub
parent 2ba66afb9f
commit b229d6e1b0
13 changed files with 408 additions and 30 deletions
+23
View File
@@ -0,0 +1,23 @@
# Tensorflow Serving Environment Example
## Create Environment
```bash
$ fission env create --name tensorflow --image fission/tensorflow-serving --version 2
```
## Create Package
```bash
$ zip -r half_plus_two.zip ./half_plus_two
$ fission pkg create --env tensorflow --deploy half_plus_two.zip
```
## Create Function
Here, the `--entrypoint` represents the name of top directory contains trained model.
```bash
$ fission fn create --name t1 --pkg <pkg name> --env tensorflow --entrypoint "half_plus_two"
$ fission fn test --name t1 --body '{"instances": [1.0, 2.0, 0.0]}' --method POST
```