Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -10
Dockerfile
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
#
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
-
# Install dependencies
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
tesseract-ocr \
|
7 |
-
|
|
|
|
|
|
|
8 |
&& apt-get clean \
|
9 |
&& rm -rf /var/lib/apt/lists/*
|
10 |
|
11 |
-
# Set
|
12 |
WORKDIR /app
|
13 |
|
14 |
-
# Copy
|
15 |
-
COPY
|
16 |
-
COPY
|
17 |
|
18 |
# Install Python packages
|
19 |
RUN pip install --no-cache-dir -r requirements.txt
|
20 |
|
21 |
-
# Set environment variables
|
22 |
-
ENV PYTHONUNBUFFERED=1
|
23 |
-
|
24 |
# Run the app
|
25 |
CMD ["python", "app.py"]
|
|
|
1 |
+
# Use Python base image
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
+
# Install system dependencies
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
tesseract-ocr \
|
7 |
+
libglib2.0-0 \
|
8 |
+
libsm6 \
|
9 |
+
libxext6 \
|
10 |
+
libxrender-dev \
|
11 |
&& apt-get clean \
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
+
# Set work directory
|
15 |
WORKDIR /app
|
16 |
|
17 |
+
# Copy code
|
18 |
+
COPY app.py .
|
19 |
+
COPY requirements.txt .
|
20 |
|
21 |
# Install Python packages
|
22 |
RUN pip install --no-cache-dir -r requirements.txt
|
23 |
|
|
|
|
|
|
|
24 |
# Run the app
|
25 |
CMD ["python", "app.py"]
|