GoodML commited on
Commit
9562ac2
·
verified ·
1 Parent(s): dd04276

tesseract with ffmpeg

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -3
Dockerfile CHANGED
@@ -1,8 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  FROM python:3.10
2
 
3
- # Install Tesseract-OCR and language data
4
  RUN apt-get update && \
5
- apt-get install -y tesseract-ocr tesseract-ocr-eng && \
6
  rm -rf /var/lib/apt/lists/*
7
 
8
  # Create a user and set up the environment
@@ -21,4 +47,4 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
21
  COPY --chown=user . /app
22
 
23
  # Run Gunicorn with timeout and workers
24
- CMD ["gunicorn", "--timeout", "120", "-w", "2", "-b", "0.0.0.0:7860", "app:app"]
 
1
+ # FROM python:3.10
2
+
3
+ # # Install Tesseract-OCR and language data
4
+ # RUN apt-get update && \
5
+ # apt-get install -y tesseract-ocr tesseract-ocr-eng && \
6
+ # rm -rf /var/lib/apt/lists/*
7
+
8
+ # # Create a user and set up the environment
9
+ # RUN useradd -m -u 1000 user
10
+ # USER user
11
+ # ENV PATH="/home/user/.local/bin:$PATH"
12
+
13
+ # # Set the working directory
14
+ # WORKDIR /app
15
+
16
+ # # Copy and install Python dependencies
17
+ # COPY --chown=user ./requirements.txt requirements.txt
18
+ # RUN pip install --no-cache-dir --upgrade -r requirements.txt
19
+
20
+ # # Copy the application code
21
+ # COPY --chown=user . /app
22
+
23
+ # # Run Gunicorn with timeout and workers
24
+ # CMD ["gunicorn", "--timeout", "120", "-w", "2", "-b", "0.0.0.0:7860", "app:app"]
25
+
26
+
27
  FROM python:3.10
28
 
29
+ # Install Tesseract-OCR, ffmpeg, and language data
30
  RUN apt-get update && \
31
+ apt-get install -y tesseract-ocr tesseract-ocr-eng ffmpeg && \
32
  rm -rf /var/lib/apt/lists/*
33
 
34
  # Create a user and set up the environment
 
47
  COPY --chown=user . /app
48
 
49
  # Run Gunicorn with timeout and workers
50
+ CMD ["gunicorn", "--timeout", "120", "-w", "2", "-b", "0.0.0.0:7860", "app:app"]