mike23415 commited on
Commit
14d96da
·
verified ·
1 Parent(s): a911ba5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 (if needed for libraries like PyPDF2)
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
- # Set environment variable for NLTK data path
23
- ENV NLTK_DATA=/app/nltk_data
24
-
25
- # Expose the application port (Spaces expects 7860)
26
  EXPOSE 7860
27
 
28
- # Command to run the application with Gunicorn
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"]