Spaces:
Running
Running
github-actions[bot] commited on
Commit ·
aaa415f
1
Parent(s): 0626a3f
Deploy from GitHub Actions: a63dd9879e7bd1021036f94c5954ae8e098dd204
Browse files- Dockerfile +8 -2
- requirements.txt +5 -1
Dockerfile
CHANGED
|
@@ -2,9 +2,13 @@ FROM python:3.12-slim
|
|
| 2 |
|
| 3 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 4 |
ca-certificates \
|
| 5 |
-
|
| 6 |
libgl1 \
|
| 7 |
libglib2.0-0 \
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
|
@@ -12,13 +16,15 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
|
| 12 |
ENV ENV=production \
|
| 13 |
PORT=7860 \
|
| 14 |
PYTHONUNBUFFERED=1 \
|
| 15 |
-
PYTHONDONTWRITEBYTECODE=1
|
|
|
|
| 16 |
|
| 17 |
RUN useradd -m -u 1000 user
|
| 18 |
WORKDIR /home/user/app
|
| 19 |
|
| 20 |
COPY requirements.txt .
|
| 21 |
RUN uv pip install --no-cache --system -r requirements.txt
|
|
|
|
| 22 |
|
| 23 |
RUN chown -R user:user /home/user/app
|
| 24 |
|
|
|
|
| 2 |
|
| 3 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 4 |
ca-certificates \
|
| 5 |
+
libmagic-dev \
|
| 6 |
libgl1 \
|
| 7 |
libglib2.0-0 \
|
| 8 |
+
libxml2 \
|
| 9 |
+
libxslt1-dev \
|
| 10 |
+
poppler-utils \
|
| 11 |
+
tesseract-ocr \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
|
|
|
| 16 |
ENV ENV=production \
|
| 17 |
PORT=7860 \
|
| 18 |
PYTHONUNBUFFERED=1 \
|
| 19 |
+
PYTHONDONTWRITEBYTECODE=1 \
|
| 20 |
+
NLTK_DATA=/home/user/nltk_data
|
| 21 |
|
| 22 |
RUN useradd -m -u 1000 user
|
| 23 |
WORKDIR /home/user/app
|
| 24 |
|
| 25 |
COPY requirements.txt .
|
| 26 |
RUN uv pip install --no-cache --system -r requirements.txt
|
| 27 |
+
RUN python -m nltk.downloader -d /home/user/nltk_data punkt averaged_perceptron_tagger punkt_tab averaged_perceptron_tagger_eng
|
| 28 |
|
| 29 |
RUN chown -R user:user /home/user/app
|
| 30 |
|
requirements.txt
CHANGED
|
@@ -14,6 +14,10 @@ google-generativeai
|
|
| 14 |
|
| 15 |
langchain-pymupdf4llm
|
| 16 |
unstructured[csv,docx,pptx,xlsx]
|
| 17 |
-
python-pptx
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
markdown
|
| 19 |
jq
|
|
|
|
| 14 |
|
| 15 |
langchain-pymupdf4llm
|
| 16 |
unstructured[csv,docx,pptx,xlsx]
|
| 17 |
+
python-pptx
|
| 18 |
+
python-pptx #HF
|
| 19 |
+
python-magic #HF
|
| 20 |
+
docx2txt #HF
|
| 21 |
+
openpyxl #HF
|
| 22 |
markdown
|
| 23 |
jq
|