Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +32 -0
Dockerfile
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use official Python image
|
2 |
+
FROM python:3.10
|
3 |
+
|
4 |
+
# Install system dependencies for Tesseract and other utilities
|
5 |
+
RUN apt-get update && apt-get install -y \
|
6 |
+
tesseract-ocr \
|
7 |
+
libtesseract-dev \
|
8 |
+
git \
|
9 |
+
ffmpeg \
|
10 |
+
libsm6 \
|
11 |
+
libxext6 \
|
12 |
+
cmake \
|
13 |
+
&& rm -rf /var/lib/apt/lists/*
|
14 |
+
|
15 |
+
# Set working directory inside the container
|
16 |
+
WORKDIR /home/user/app
|
17 |
+
|
18 |
+
# Copy the requirements file and install dependencies
|
19 |
+
COPY requirements.txt .
|
20 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
21 |
+
|
22 |
+
# Set the path for Tesseract
|
23 |
+
ENV TESSERACT_PATH="/usr/bin/tesseract"
|
24 |
+
|
25 |
+
# Copy all project files into the container
|
26 |
+
COPY . .
|
27 |
+
|
28 |
+
# Expose the default Gradio port
|
29 |
+
EXPOSE 7860
|
30 |
+
|
31 |
+
# Run the application
|
32 |
+
CMD ["python", "app.py"]
|