mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-26 17:51:54 +01:00
40 lines
1.3 KiB
Docker
40 lines
1.3 KiB
Docker
FROM python:3.11.7-slim-bookworm
|
|
|
|
# Default DANSWER_VERSION, typically overriden during builds by GitHub Actions.
|
|
ARG DANSWER_VERSION=0.3-dev
|
|
ENV DANSWER_VERSION=${DANSWER_VERSION}
|
|
RUN echo "DANSWER_VERSION: ${DANSWER_VERSION}"
|
|
|
|
COPY ./requirements/model_server.txt /tmp/requirements.txt
|
|
RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt
|
|
|
|
RUN apt-get remove -y --allow-remove-essential perl-base && \
|
|
apt-get autoremove -y
|
|
|
|
WORKDIR /app
|
|
|
|
# Needed for model configs and defaults
|
|
COPY ./danswer/configs /app/danswer/configs
|
|
COPY ./danswer/dynamic_configs /app/danswer/dynamic_configs
|
|
|
|
# Utils used by model server
|
|
COPY ./danswer/utils/logger.py /app/danswer/utils/logger.py
|
|
COPY ./danswer/utils/timing.py /app/danswer/utils/timing.py
|
|
COPY ./danswer/utils/telemetry.py /app/danswer/utils/telemetry.py
|
|
|
|
# Place to fetch version information
|
|
COPY ./danswer/__init__.py /app/danswer/__init__.py
|
|
|
|
# Shared implementations for running NLP models locally
|
|
COPY ./danswer/search/search_nlp_models.py /app/danswer/search/search_nlp_models.py
|
|
|
|
# Request/Response models
|
|
COPY ./shared_models /app/shared_models
|
|
|
|
# Model Server main code
|
|
COPY ./model_server /app/model_server
|
|
|
|
ENV PYTHONPATH /app
|
|
|
|
CMD ["uvicorn", "model_server.main:app", "--host", "0.0.0.0", "--port", "9000"]
|