mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-10-30 01:09:43 +00:00
* remove env variables from dockerfiles * add more config options to rest api. make fields optional. change to elasticsearch as default * skip reader if retriever doesn't return anything * add more config params to farm reader. fix top_k_per_sample * update FARM version
42 lines
925 B
Plaintext
42 lines
925 B
Plaintext
FROM nvidia/cuda:10.1-runtime
|
|
|
|
WORKDIR /home/user
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y python3-pip python3-dev \
|
|
&& cd /usr/local/bin \
|
|
&& ln -s /usr/bin/python3 python \
|
|
&& pip3 install --upgrade pip
|
|
|
|
# Install some basic utilities
|
|
RUN apt-get update && apt-get install -y \
|
|
curl \
|
|
ca-certificates \
|
|
sudo \
|
|
git \
|
|
bzip2 \
|
|
libx11-6 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# copy code
|
|
COPY haystack /home/user/haystack
|
|
|
|
# install as a package
|
|
COPY setup.py requirements.txt README.rst /home/user/
|
|
RUN pip install -r requirements.txt
|
|
RUN pip install -e .
|
|
|
|
# copy saved FARM models
|
|
COPY models /home/user/models
|
|
|
|
# Optional: copy sqlite db if needed for testing
|
|
#COPY qa.db /home/user/
|
|
|
|
EXPOSE 8000
|
|
|
|
ENV LC_ALL=C.UTF-8
|
|
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"] |