Omkar1806 commited on
Commit
270849c
·
verified ·
1 Parent(s): bf41cf1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -10
Dockerfile CHANGED
@@ -1,21 +1,19 @@
1
- # 1. Base image: Python 3.9 (stable aur light)
2
  FROM python:3.9-slim
3
 
4
- # 2. Container ke andar working directory create karo
5
  WORKDIR /app
6
 
7
- # 3. Pehle requirements copy karke install karo taaki build fast ho
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- # 4. Saari files (app.py, env.py, etc.) ko /app ke andar copy karo
12
- COPY . /app/
13
 
14
- # 5. PYTHONPATH set karo taaki app.py aur env.py ek dusre ko dhoond sakein
15
- ENV PYTHONPATH=/app
16
 
17
- # 6. Hugging Face port 7860 use karta hai
18
- EXPOSE 7860
19
 
20
- # 7. Final Command: Yeh app ko start rakhegi aur crash nahi hone degi
21
  CMD ["python", "app.py"]
 
 
1
  FROM python:3.9-slim
2
 
 
3
  WORKDIR /app
4
 
5
+ # Requirements install
6
  COPY requirements.txt .
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
+ # Sab kuch copy karo
10
+ COPY . .
11
 
12
+ # Logs mein check karne ke liye ki files kahan hain
13
+ RUN ls -R
14
 
15
+ # Path fix
16
+ ENV PYTHONPATH=/app
17
 
18
+ # Force fully path dena
19
  CMD ["python", "app.py"]