KeyarSrini commited on
Commit
ae3f233
·
verified ·
1 Parent(s): e0719e7

Update DockerFile

Browse files
Files changed (1) hide show
  1. DockerFile +6 -24
DockerFile CHANGED
@@ -1,30 +1,12 @@
1
- # Base image
2
- FROM python:3.10-slim
3
 
4
- # Set environment
5
- ENV PYTHONDONTWRITEBYTECODE 1
6
- ENV PYTHONUNBUFFERED 1
7
 
8
- # Install dependencies
9
- RUN apt-get update && apt-get install -y \
10
- tesseract-ocr \
11
- libglib2.0-0 \
12
- libsm6 \
13
- libxext6 \
14
- libxrender-dev \
15
- poppler-utils \
16
- && rm -rf /var/lib/apt/lists/*
17
-
18
- # Copy app files
19
  WORKDIR /app
20
- COPY . .
21
-
22
- # Install Python dependencies
23
- RUN pip install --upgrade pip
24
  RUN pip install -r requirements.txt
25
 
26
- # Expose port
27
- EXPOSE 7860
28
-
29
- # Run the app
30
  CMD ["python", "app.py"]
 
1
+ FROM python:3.9-slim
 
2
 
3
+ RUN apt-get update && \
4
+ apt-get install -y tesseract-ocr libglib2.0-0 libsm6 libxext6 libxrender-dev && \
5
+ pip install --upgrade pip
6
 
7
+ COPY requirements.txt /app/requirements.txt
 
 
 
 
 
 
 
 
 
 
8
  WORKDIR /app
 
 
 
 
9
  RUN pip install -r requirements.txt
10
 
11
+ COPY . /app
 
 
 
12
  CMD ["python", "app.py"]