Spaces:
Sleeping
Sleeping
File size: 984 Bytes
8058e7e 5f17e3d 8058e7e 5f17e3d 8058e7e 5f17e3d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | FROM python:3.11-bookworm
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PIP_NO_CACHE_DIR=1
ENV PIP_DEFAULT_TIMEOUT=120
ENV HF_HOME=/app/.cache/huggingface
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements-docker.txt .
RUN python -m pip install --upgrade pip \
&& python -m pip install --index-url https://download.pytorch.org/whl/cpu torch \
&& python -m pip install -r requirements-docker.txt
COPY app ./app
COPY frontend ./frontend
COPY scripts ./scripts
COPY data/sample_insurance_claim_guide.pdf ./data/sample_insurance_claim_guide.pdf
COPY .env.example ./.env.example
RUN mkdir -p /app/data/uploads /app/.cache/huggingface
EXPOSE 7860
HEALTHCHECK --interval=30s --timeout=10s --start-period=180s --retries=3 \
CMD curl -fsS http://127.0.0.1:7860/api/health || exit 1
CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |