ayman-ejaz-dev commited on
Commit
77dc8ac
·
verified ·
1 Parent(s): f2fdca3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile CHANGED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 1. Base Image (Python ka lightweight version)
2
+ FROM python:3.9-slim
3
+
4
+ # 2. System dependencies (PIL/Pillow aur Torch ke liye zaroori hain)
5
+ RUN apt-get update && apt-get install -y \
6
+ libgl1-mesa-glx \
7
+ libglib2.0-0 \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # 3. App directory banayein
11
+ WORKDIR /app
12
+
13
+ # 4. Requirements copy aur install karein
14
+ COPY requirements.txt .
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # 5. Baqi saara code copy karein
18
+ COPY . .
19
+
20
+ # 6. Hugging Face Spaces ya Local ke liye port 7860 expose karein
21
+ EXPOSE 7860
22
+
23
+ # 7. Flask App run karein
24
+ CMD ["python", "app.py"]