Set up for k8s
This commit is contained in:
parent
19fe91c1bc
commit
b59aed8d49
3 changed files with 18 additions and 0 deletions
5
Dockerfile
Normal file
5
Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
FROM python:3.6
|
||||||
|
ADD . /code
|
||||||
|
WORKDIR /code
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
CMD exec gunicorn -k gevent -b 0.0.0.0:$PORT asr:app
|
|
@ -45,6 +45,10 @@ def parse_chunks(stream):
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/heartbeat')
|
||||||
|
def heartbeat():
|
||||||
|
return 'ok'
|
||||||
|
|
||||||
@app.route('/NmspServlet/', methods=["POST"])
|
@app.route('/NmspServlet/', methods=["POST"])
|
||||||
def recognise():
|
def recognise():
|
||||||
stream = request.stream
|
stream = request.stream
|
||||||
|
|
9
cloudbuild.yaml
Normal file
9
cloudbuild.yaml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
steps:
|
||||||
|
- name: 'gcr.io/cloud-builders/docker'
|
||||||
|
args:
|
||||||
|
- build
|
||||||
|
- "--tag=gcr.io/pebble-rebirth/asr"
|
||||||
|
- "--file=./Dockerfile"
|
||||||
|
- .
|
||||||
|
images:
|
||||||
|
- "gcr.io/pebble-rebirth/asr"
|
Reference in a new issue