KZTech commited on
Commit
726d4d9
·
verified ·
1 Parent(s): d6261a1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -9
Dockerfile CHANGED
@@ -1,29 +1,25 @@
1
- # Use an official Python runtime as a parent image
2
  FROM python:3.9-slim
3
 
4
- # Set environment variables
5
  ENV DEBIAN_FRONTEND=noninteractive
6
 
7
- # Install Tesseract OCR and its dependencies
8
  RUN apt-get update && apt-get install -y \
9
  tesseract-ocr \
10
  libtesseract-dev \
11
  libleptonica-dev \
12
- pkg-config \
13
  poppler-utils \
14
- && apt-get clean \
15
- && rm -rf /var/lib/apt/lists/*
16
 
17
  # Install Python dependencies
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
- # Copy the application code
22
  COPY app.py .
23
 
24
- # Expose the port Streamlit will run on
25
  EXPOSE 7860
26
 
27
- # Command to run the application
28
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
29
 
 
 
 
1
  FROM python:3.9-slim
2
 
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
+ # Install Tesseract OCR and dependencies
6
  RUN apt-get update && apt-get install -y \
7
  tesseract-ocr \
8
  libtesseract-dev \
9
  libleptonica-dev \
 
10
  poppler-utils \
11
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
 
12
 
13
  # Install Python dependencies
14
  COPY requirements.txt .
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
+ # Copy app code
18
  COPY app.py .
19
 
 
20
  EXPOSE 7860
21
 
22
+ # Run Streamlit app
23
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
24
 
25
+