Update Dockerfiles to use Gunicorn for deployment (#69)

This commit is contained in:
Tanay Soni 2020-04-21 16:14:51 +02:00 committed by GitHub
parent 4b98f60c37
commit 51a3851f93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -19,4 +19,4 @@ COPY models /home/user/models
EXPOSE 8000
# cmd for running the API
CMD ["uvicorn", "haystack.api.inference:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["gunicorn", "haystack.api.application:app", "-b", "0.0.0.0", "-k", "uvicorn.workers.UvicornWorker", "--workers", "2"]

View File

@ -39,4 +39,4 @@ ENV LANG=C.UTF-8
# cmd for running the API
CMD ["uvicorn", "haystack.api.inference:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1", "--limit-concurrency", "3"]
CMD ["gunicorn", "haystack.api.application:app", "-b", "0.0.0.0", "-k", "uvicorn.workers.UvicornWorker", "--workers", "2"]

View File

@ -2,7 +2,7 @@
-e git://github.com/deepset-ai/FARM.git@ecee40e34781394a805c7dde14e6cc2570372798#egg=farm
fastapi
uvicorn
flask_sqlalchemy
gunicorn
pandas
psycopg2-binary
sklearn