Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -9
Dockerfile
CHANGED
@@ -4,7 +4,7 @@ FROM python:3.9-slim
|
|
4 |
# Set working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Install system dependencies
|
8 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
9 |
gcc \
|
10 |
&& rm -rf /var/lib/apt/lists/*
|
@@ -13,17 +13,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
13 |
COPY requirements.txt .
|
14 |
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
16 |
-
# Pre-download NLTK data to avoid runtime downloads
|
17 |
-
RUN python -m nltk.downloader -d /app/nltk_data punkt stopwords
|
18 |
-
|
19 |
# Copy the entire application
|
20 |
COPY . .
|
21 |
|
22 |
-
#
|
23 |
-
ENV NLTK_DATA=/app/nltk_data
|
24 |
-
|
25 |
-
# Expose the application port (Spaces expects 7860)
|
26 |
EXPOSE 7860
|
27 |
|
28 |
-
#
|
29 |
CMD ["gunicorn", "-w", "2", "-b", "0.0.0.0:7860", "--log-level", "info", "app:app"]
|
|
|
4 |
# Set working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Install system dependencies for PyPDF2, python-pptx, etc.
|
8 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
9 |
gcc \
|
10 |
&& rm -rf /var/lib/apt/lists/*
|
|
|
13 |
COPY requirements.txt .
|
14 |
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
|
|
|
|
|
|
16 |
# Copy the entire application
|
17 |
COPY . .
|
18 |
|
19 |
+
# Expose the application port
|
|
|
|
|
|
|
20 |
EXPOSE 7860
|
21 |
|
22 |
+
# Run Gunicorn with logging
|
23 |
CMD ["gunicorn", "-w", "2", "-b", "0.0.0.0:7860", "--log-level", "info", "app:app"]
|