| FROM python:3.13-slim
|
|
|
| WORKDIR /app
|
|
|
|
|
| RUN apt-get update && apt-get install -y --no-install-recommends \
|
| gcc \
|
| antiword \
|
| catdoc \
|
| tesseract-ocr \
|
| tesseract-ocr-eng \
|
| tesseract-ocr-chi-sim \
|
| && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
| COPY pyproject.toml requirements.txt ./
|
| COPY termprep/ termprep/
|
| COPY web/ web/
|
| COPY web_entry.py .
|
|
|
|
|
| RUN echo "=== termprep/ contents ===" && ls -la termprep/ && echo "=== termprep/web/ contents ===" && ls -la termprep/web/
|
|
|
|
|
| RUN pip install --no-cache-dir -e . gunicorn
|
|
|
|
|
| EXPOSE 7860
|
|
|
|
|
| CMD ["gunicorn", "-w", "2", "-k", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:7860", "web_entry:app"]
|
|
|