Ali-Raza-167 commited on
Commit
accda98
·
verified ·
1 Parent(s): fc39378

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.9 slim image
2
+ FROM python:3.9-slim
3
+
4
+ # Install system dependencies
5
+ RUN apt-get update && apt-get install -y \
6
+ poppler-utils \
7
+ tesseract-ocr \
8
+ tesseract-ocr-eng \
9
+ libgl1-mesa-glx \
10
+ libglib2.0-0 \
11
+ libsm6 \
12
+ libxext6 \
13
+ libxrender-dev \
14
+ libgomp1 \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Set working directory
18
+ WORKDIR /app
19
+
20
+ # Copy requirements and install Python dependencies
21
+ COPY requirements.txt .
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Copy application code
25
+ COPY app.py .
26
+
27
+ # Expose port
28
+ EXPOSE 7860
29
+
30
+ # Set environment variables
31
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
32
+ ENV GRADIO_SERVER_PORT="7860"
33
+
34
+ # Run the application
35
+ CMD ["python", "app.py"]