This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Web server script that exposes REST endpoint and pushes images to Redis for classification by model server. Polls | |
Redis for response from model server. | |
Adapted from https://www.pyimagesearch.com/2018/02/05/deep-learning-production-keras-redis-flask-apache/ | |
""" | |
import base64 | |
import io | |
import json | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Model server script that polls Redis for images to classify | |
Adapted from https://www.pyimagesearch.com/2018/02/05/deep-learning-production-keras-redis-flask-apache/ | |
""" | |
import base64 | |
import json | |
import os | |
import sys | |
import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
redis: | |
image: redis | |
networks: | |
- deployml_network | |
modelserver: | |
image: localhost:5000/modelserver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Web server script that exposes endpoints and pushes images to Redis for classification by model server. Polls | |
Redis for response from model server. | |
Adapted from https://www.pyimagesearch.com/2018/02/05/deep-learning-production-keras-redis-flask-apache/ | |
""" | |
import base64 | |
import io | |
import json | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Model server script that polls Redis for images to classify | |
Adapted from https://www.pyimagesearch.com/2018/02/05/deep-learning-production-keras-redis-flask-apache/ | |
""" | |
import base64 | |
import json | |
import os | |
import sys | |
import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
redis: | |
image: redis | |
networks: | |
- deployml_network | |
modelserver: | |
image: shanesoh/modelserver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
redis: | |
image: redis | |
networks: | |
- deployml_network | |
modelserver: | |
image: shanesoh/modelserver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
envoy: | |
build: ./compose/envoy | |
ports: | |
- "8080:80" | |
volumes: | |
- ./envoy.yaml:/config/envoy.yaml | |
environment: | |
- DEBUG_LEVEL=info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package istio.authz | |
import input.attributes.request.http as http_request | |
default allow = false | |
allow = response { | |
http_request.method == "GET" | |
response := { | |
"allowed": true, |