Norakneath commited on
Commit
649f113
·
verified ·
1 Parent(s): b29b200

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -4
Dockerfile CHANGED
@@ -1,9 +1,11 @@
1
  # Use official Python image
2
  FROM python:3.10
3
 
4
- # Install system dependencies for Tesseract and other utilities
5
  RUN apt-get update && apt-get install -y \
 
6
  tesseract-ocr \
 
7
  libtesseract-dev \
8
  git \
9
  ffmpeg \
@@ -12,7 +14,7 @@ RUN apt-get update && apt-get install -y \
12
  cmake \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # Verify if Tesseract is installed correctly
16
  RUN which tesseract && tesseract --version
17
 
18
  # Set working directory inside the container
@@ -22,13 +24,13 @@ WORKDIR /home/user/app
22
  COPY requirements.txt .
23
  RUN pip install --no-cache-dir -r requirements.txt
24
 
25
- # Set the path for Tesseract
26
  ENV TESSERACT_PATH="/usr/bin/tesseract"
27
 
28
  # Copy all project files into the container
29
  COPY . .
30
 
31
- # Expose the default Gradio port
32
  EXPOSE 7860
33
 
34
  # Run the application
 
1
  # Use official Python image
2
  FROM python:3.10
3
 
4
+ # Install system dependencies, including Tesseract OCR
5
  RUN apt-get update && apt-get install -y \
6
+ software-properties-common \
7
  tesseract-ocr \
8
+ tesseract-ocr-all \
9
  libtesseract-dev \
10
  git \
11
  ffmpeg \
 
14
  cmake \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # Verify Tesseract installation
18
  RUN which tesseract && tesseract --version
19
 
20
  # Set working directory inside the container
 
24
  COPY requirements.txt .
25
  RUN pip install --no-cache-dir -r requirements.txt
26
 
27
+ # Set the Tesseract path in the environment
28
  ENV TESSERACT_PATH="/usr/bin/tesseract"
29
 
30
  # Copy all project files into the container
31
  COPY . .
32
 
33
+ # Expose the Gradio default port
34
  EXPOSE 7860
35
 
36
  # Run the application