NitinBot001 commited on
Commit
488312f
·
verified ·
1 Parent(s): 276e47a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +36 -0
Dockerfile ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Optional Dockerfile for containerized deployment
2
+ FROM python:3.10-slim
3
+
4
+ # Install system dependencies
5
+ RUN apt-get update && apt-get install -y \
6
+ git \
7
+ wget \
8
+ curl \
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
+ COPY README.md .
27
+
28
+ # Expose ports
29
+ EXPOSE 7860 7861
30
+
31
+ # Set environment variables
32
+ ENV PYTHONUNBUFFERED=1
33
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
34
+
35
+ # Run the application
36
+ CMD ["python", "app.py"]