KZTech commited on
Commit
67817c7
·
verified ·
1 Parent(s): a8427bb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -7
Dockerfile CHANGED
@@ -1,14 +1,32 @@
1
- FFROM python:3.10-slim
 
2
 
 
 
 
 
3
  RUN apt-get update && apt-get install -y \
4
- tesseract-ocr \
5
- libgl1-mesa-glx libsm6 libxext6 \
6
- && apt-get clean
 
 
 
 
 
7
 
 
8
  WORKDIR /app
 
 
9
  COPY requirements.txt .
10
- RUN pip install -r requirements.txt
11
 
12
- COPY app.py .
 
 
 
 
 
 
 
13
 
14
- CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.enableCORS=false"]
 
1
+ # Use the official slim Python base image
2
+ FROM python:3.10-slim
3
 
4
+ # Set environment variables to avoid prompts during install
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Install system dependencies
8
  RUN apt-get update && apt-get install -y \
9
+ build-essential \
10
+ gcc \
11
+ libffi-dev \
12
+ libpq-dev \
13
+ libssl-dev \
14
+ curl \
15
+ && apt-get clean \
16
+ && rm -rf /var/lib/apt/lists/*
17
 
18
+ # Set the working directory
19
  WORKDIR /app
20
+
21
+ # Copy requirements file if you have one
22
  COPY requirements.txt .
 
23
 
24
+ # Install Python dependencies
25
+ RUN pip install --upgrade pip && pip install -r requirements.txt
26
+
27
+ # Copy the rest of your application
28
+ COPY . .
29
+
30
+ # Set the default command to run your app (adjust if needed)
31
+ CMD ["python", "app.py"]
32