github-actions[bot] commited on
Commit
177b4ac
·
1 Parent(s): da2766a

Deploy from GitHub Actions: 93644532cd20b905ce6e355b8a526fbc32273d5c

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -11
  2. requirements.txt +1 -6
Dockerfile CHANGED
@@ -2,13 +2,7 @@ FROM python:3.12-slim
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,15 +10,13 @@ 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
 
@@ -36,4 +28,4 @@ COPY --chown=user app app
36
 
37
  EXPOSE ${PORT}
38
 
39
- CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT}"]
 
2
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
  ca-certificates \
5
+ libmagic1 \
 
 
 
 
 
 
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
 
10
  ENV ENV=production \
11
  PORT=7860 \
12
  PYTHONUNBUFFERED=1 \
13
+ PYTHONDONTWRITEBYTECODE=1
 
14
 
15
  RUN useradd -m -u 1000 user
16
  WORKDIR /home/user/app
17
 
18
  COPY requirements.txt .
19
  RUN uv pip install --no-cache --system -r requirements.txt
 
20
 
21
  RUN chown -R user:user /home/user/app
22
 
 
28
 
29
  EXPOSE ${PORT}
30
 
31
+ CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT}"]
requirements.txt CHANGED
@@ -14,10 +14,5 @@ google-generativeai
14
 
15
  langchain-pymupdf4llm
16
  unstructured[csv,docx,pptx,xlsx]
17
- python-pptx
18
- python-magic
19
- docx2txt
20
- openpyxl
21
- nltk
22
  markdown
23
- jq
 
14
 
15
  langchain-pymupdf4llm
16
  unstructured[csv,docx,pptx,xlsx]
 
 
 
 
 
17
  markdown
18
+ jq