| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Requirements install karein | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Saara code copy karein | |
| COPY . . | |
| # PATH FIX: Python ko batana ke /app mein modules hain | |
| ENV PYTHONPATH=/app | |
| # PERMISSION FIX: Hugging Face user ko permissions dena | |
| RUN chmod -R 777 /app | |
| # Port 7860 Hugging Face ke liye standard hai | |
| EXPOSE 7860 | |
| # Command: api folder ke andar main.py dhoondo | |
| CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "7860"] |