haystack/Dockerfile

22 lines
472 B
Docker
Raw Normal View History

2019-11-14 11:42:51 +01:00
FROM python:3.7.4-stretch
WORKDIR /home/user
# install as a package
COPY setup.py requirements.txt README.rst /home/user/
RUN pip install -r requirements.txt
RUN pip install -e .
# copy code
COPY haystack /home/user/haystack
2019-11-14 11:42:51 +01:00
# copy saved FARM models
2020-02-28 17:49:08 +01:00
COPY models /home/user/models
# copy sqlite db if needed for testing
#COPY qa.db /home/user/
EXPOSE 8000
2019-11-14 11:42:51 +01:00
# cmd for running the API
2020-02-28 17:49:08 +01:00
CMD ["uvicorn", "haystack.api.inference:app", "--host", "0.0.0.0", "--port", "8000"]