damoojeje commited on
Commit
937d5fa
·
verified ·
1 Parent(s): 82a88ef

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -17
Dockerfile CHANGED
@@ -1,34 +1,38 @@
1
- # ============================
2
- # ✅ Dockerfile for SmartManuals-AI
3
- # ============================
4
-
5
  FROM python:3.10-slim
6
 
7
- # Install system dependencies
8
  RUN apt-get update && apt-get install -y \
9
- build-essential \
10
- poppler-utils \
11
  tesseract-ocr \
12
  libglib2.0-0 \
 
 
 
13
  libsm6 \
14
  libxext6 \
15
  libxrender-dev \
16
- && apt-get clean && rm -rf /var/lib/apt/lists/*
 
 
 
17
 
18
- # Set work directory
19
- WORKDIR /app
 
 
20
 
21
- # Copy requirements first to leverage Docker layer caching
22
- COPY requirements.txt ./
23
 
24
- # Install Python dependencies
 
25
  RUN pip install --upgrade pip && pip install -r requirements.txt
26
 
27
- # Copy rest of the application
28
  COPY . .
29
 
30
- # Expose the default Gradio port
31
- EXPOSE 7860
32
 
33
- # Run the app
34
  CMD ["python", "app.py"]
 
1
+ # Base image
 
 
 
2
  FROM python:3.10-slim
3
 
4
+ # System dependencies for OCR, PDF, DOCX, fonts, and more
5
  RUN apt-get update && apt-get install -y \
 
 
6
  tesseract-ocr \
7
  libglib2.0-0 \
8
+ libgl1 \
9
+ libpoppler-cpp-dev \
10
+ poppler-utils \
11
  libsm6 \
12
  libxext6 \
13
  libxrender-dev \
14
+ ffmpeg \
15
+ build-essential \
16
+ git \
17
+ && rm -rf /var/lib/apt/lists/*
18
 
19
+ # Set environment variables
20
+ ENV PIP_NO_CACHE_DIR=1 \
21
+ PYTHONUNBUFFERED=1 \
22
+ HF_HUB_DISABLE_SYMLINKS_WARNING=1
23
 
24
+ # Set working directory
25
+ WORKDIR /home/user/app
26
 
27
+ # Copy requirements and install
28
+ COPY requirements.txt .
29
  RUN pip install --upgrade pip && pip install -r requirements.txt
30
 
31
+ # Copy app files
32
  COPY . .
33
 
34
+ # Download NLTK data
35
+ RUN python -m nltk.downloader punkt
36
 
37
+ # Start the app
38
  CMD ["python", "app.py"]