Inayatgaming commited on
Commit
46bf256
·
verified ·
1 Parent(s): 3a92220

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +41 -0
Dockerfile ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ==========================================
2
+ # Base Image
3
+ # ==========================================
4
+ FROM python:3.10-slim
5
+
6
+ # ==========================================
7
+ # Environment Setup
8
+ # ==========================================
9
+ ENV PYTHONUNBUFFERED=1
10
+ ENV PORT=7860
11
+ WORKDIR /app
12
+
13
+ # ==========================================
14
+ # Install system dependencies
15
+ # ==========================================
16
+ RUN apt-get update && apt-get install -y \
17
+ git \
18
+ libgl1 \
19
+ libglib2.0-0 \
20
+ && rm -rf /var/lib/apt/lists/*
21
+
22
+ # ==========================================
23
+ # Copy application files
24
+ # ==========================================
25
+ COPY app.py /app/app.py
26
+ COPY requirements.txt /app/requirements.txt
27
+
28
+ # ==========================================
29
+ # Install Python dependencies
30
+ # ==========================================
31
+ RUN pip install --no-cache-dir -r requirements.txt
32
+
33
+ # ==========================================
34
+ # Expose port
35
+ # ==========================================
36
+ EXPOSE 7860
37
+
38
+ # ==========================================
39
+ # Run Flask app
40
+ # ==========================================
41
+ CMD ["python", "app.py"]