Omkar1806 commited on
Commit
6314ebe
·
verified ·
1 Parent(s): be67801

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -9
Dockerfile CHANGED
@@ -1,19 +1,19 @@
1
- # 1. Base image (Python 3.9 use kar rahe hain jo stable hai)
2
  FROM python:3.9-slim
3
 
4
- # 2. Working directory set karo
5
  WORKDIR /app
6
 
7
- # 3. Pehle requirements copy karo aur install karo (Cache optimize karne ke liye)
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- # 4. Saara code copy karo
12
  COPY . .
13
 
14
- # 5. Hugging Face ka port 7860 hota hai
15
- EXPOSE 7860
16
 
17
- # 6. App ko run karne ki command
18
- # Hum uvicorn use kar rahe hain taaki app zinda rahe (Exit code 0 na aaye)
19
- CMD ["python", "app.py"]
 
 
 
 
1
  FROM python:3.9-slim
2
 
 
3
  WORKDIR /app
4
 
5
+ # Sabse pehle requirements install karo
6
  COPY requirements.txt .
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
+ # Ab saari files ko /app folder mein copy karo
10
  COPY . .
11
 
12
+ # Check karne ke liye ki files copy hui ya nahi (Optional)
13
+ RUN ls -la /app
14
 
15
+ # Path set karo taaki python ko file mil jaye
16
+ ENV PYTHONPATH=/app
17
+
18
+ # Direct command chalao
19
+ CMD ["python", "app.py"]