Update Dockerfile
Browse files123456789101112131415161718192021# 1. Base image: Python 3.9 (stable aur light)FROM python:3.9-slim# 2. Container ke andar working directory create karoWORKDIR /app# 3. Pehle requirements copy karke install karo taaki build fast hoCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt# 4. Saari files (app.py, env.py, etc.) ko /app ke andar copy karoCOPY . /app/# 5. PYTHONPATH set karo taaki app.py aur env.py ek dusre ko dhoond sakeinENV PYTHONPATH=/app# 6. Hugging Face port 7860 use karta haiEXPOSE 7860# 7. Final Command: Yeh app ko start rakhegi aur crash nahi hone degiCMD ["python", "app.py"]12345678910111213141516171819FROM python:3.9-slimWORKDIR /app# Requirements installCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt# Sab kuch copy karoCOPY . .# Logs mein check karne ke liye ki files kahan hainRUN ls -R# Path fixENV PYTHONPATH=/app# Force fully path denaCMD ["python", "app.py"]
Dockerfile+8-10